JSON Web サービス経由で画像を送信する方法はありますか?
これは、特定のフォルダーで新しい画像を検索し、(パス、画像ファイルの名前である id とファイルの作成時刻) を含むいくつかのデータを返す私のコードです。
function getAllNewPhotos($lastCHK) {
$dirPath = 'c:\my_images';
$files1 = scandir($dirPath);
$files = array_diff($files1, array('.', '..'));
$newFiles = array();
foreach ($files as $file) {
$createTime = filectime($dirPath . '/' . $file);
$path_data = pathinfo($dirPath . '/' . $file);
if ($createTime > $lastCHK) {
$newFiles[] = array(
'path' => $dirPath . '\\' . $file,
'ID' => $path_data['filename'],
'dateImagAdded' => date('Y-m-d H:i:s', $createTime),
);
}
}
return ($newFiles);
}
すでに渡した他のデータと一緒に実際の画像を送信する方法はありますか?
さらに明確にする必要がある場合は、さらに明確にする必要がある部分をお知らせください。
ありがとう