Heyy..i am using a php script to upload an image file from android app. I use HTTP Post function to upload the file(I call www.masterstroketech.org/postimage.php?fn=abc.png and then post image path). The file is being created on the server, but its size is 0 bytes.
If i use the same script on a free server at 000webhost.com then this script runs fine. What exactly is the problem?
php code is as follows :
<?PHP
$data = file_get_contents('php://input');
if (!(file_put_contents($_GET['fn'],$data) === FALSE)) echo "File xfer completed."; // file could be empty, though
else echo "File xfer failed.";
?>
"/etc/passwd"are executed and overwrite files you do not want. Your non-working hoster might have security implemented to prevent this.