Is there any way that I can send images via my JSON Webservice?
Here is my code which looks for new images in a specific folder and return some data including (path, id which is the name of image file and the creation time of the file):
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);
}
Is there any way to send the real image along with the other data which I have already passed?
If you need more clarification, please let me know which part you need more clarification.
Thanks