base64_encode($pic)); $vs = curl_init(); curl_setopt($vs, CURLOPT_URL,"http://mm214.com/wdm4403materials/wdm4403week6/sendpic/aws.php"); curl_setopt($vs, CURLOPT_POST, 1); curl_setopt($vs, CURLOPT_POSTFIELDS,$data); curl_setopt($vs, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($vs); curl_close($vs); //need to loop through directory //need to read binary //need to base64_encode binary //need to post to curl echo $result; //need to delete local on success----will do after //} ?>