I have uploaded a file from my smartphone to server using PHP
. This PHP side is only for test (because I'm testing that my android app works properly or not...), and there is no problem with client and/or server side.
But my main task is writing this server in WCF
... I don't know how can I do it.
My PHP codes looks like:
<?php
// Get image string posted from Android App
$base=$_REQUEST['image'];
// Get file name posted from Android App
$filename = $_REQUEST['filename'];
// Decode Image
$binary=base64_decode($base);
header('Content-Type: bitmap; charset=utf-8');
// Images will be saved under 'www/imgupload/uplodedimages' folder
$file = fopen('uploadedimages/'.$filename, 'wb');
// Create File
fwrite($file, $binary);
fclose($file);
echo 'Image upload complete, Please check your php file directory';
?>
If you know please help me... Actually I'm going to be crazy :(
Any comment and/or answer appreciate.
Thanks a lot.