android - Pass Bitmap and more information to PHP Server and get using $_FILES[] -
android - Pass Bitmap and more information to PHP Server and get using $_FILES[] -
i need upload taken photo php server, don't know how pass image (bitmap) , other informations, name , login, , them @ server side using $_files[].
thank in advance.
$target = "folder_name/"; $target = $target . basename( $_files['uploaded']['name']) ; $ok=1; echo "<pre>"; print_r($_files);echo "</pre>"; echo $target."<br>"; $uploaded_size=$_files['uploaded']['size']; $uploaded_type=$_files['uploaded']['type']; //this our size status if ($uploaded_size > 350000) { echo "your file large.<br>"; $ok=0; } //this our limit file type status if ($uploaded_type !="image/bmp") { echo "no php files<br>"; $ok=0; } //here check $ok not set 0 error if ($ok==0) { echo "sorry file not uploaded"; } //if ok seek upload else { if(move_uploaded_file($_files['uploaded']['tmp_name'], $target)) { echo "<b>the file ". basename( $_files['uploaded']['name']). " has been uploaded</b>"; } else { echo "sorry, there problem uploading file."; } }
php android http
Comments
Post a Comment