Upload photo for a deal API
0 items $0.00
<?php
include("src/Dealhot.php");
include("config.php");
$msg = 'Upload a photo for the deal';
$titleHeader = "Deal photo";
if(@$_POST["submit"]=="Upload"){
$action = 'photo_upload';
$photo_index = $_POST["photo_index"];
$id = $_POST["id"];
$pDate = $_POST["pDate"];
$tmpfile = $_FILES['picture'.$photo_index]['tmp_name'];
$filename = $_FILES['picture'.$photo_index]['name'];
$rest_data = array(
'file'=>'@'.$tmpfile,
'name'=> $filename,
'productID'=>$id,
'photo_index'=>$photo_index,
'pDate'=>$pDate
);
$Dealhot = new Dealhot($auth_arr,$action,$rest_data);
$result_arr = $Dealhot->upload();
if($result_arr["result"]=="success")
$msg = 'You have uploaded the photo successfully. '.$result_arr["msg"];
else if($result_arr["result"]=="fail")
$msg = 'You have failed to upload the photo. Reason: '.$result_arr["error"];
}
?>
Developer
Deals are on
Deal Ends: 28/05/2014 23:59:59
View more new and active deals