my file doesn’t uploaded to host, just create empty files on my host with 0 sizing
my php file
<?php
/*
* Written By: Taifun
* using parts from the "Web2SQL example" from ShivalWolf
* and parts from the "POST any local file to a php server example" from
Scott
*
* Date: 2013/Mar/05
* Contact: [email protected]
*
* Version 2: 'dirname(__FILE__)' added to avoid problems finding the
complete path to the script
*/
/**********************CONFIG****************************************/
//SETTINGS//
//This code is something you set in the APP so random people cant use it.
$ACCESSKEY="secret";
/********************CONFIG****************************************/
//these are just in case setting headers forcing it to always expire
header('Cache-Control: no-cache, must-revalidate');
if($_GET['p']==$ACCESSKEY){
// this is the workaround for file_get_contents(...)
require_once (dirname(__FILE__).'/PHP_Compat-
1.6.0a3/Compat/Function/file_get_contents.php');
$data = php_compat_file_get_contents('php://input');
$filename = $_GET['filename'];
if (file_put_contents($filename,$data)) {
if (filesize($filename) != 0) {
echo "File transfer completed.";
} else {
header("HTTP/1.0 400 Bad Request");
echo "File is empty.";
}
} else {
header("HTTP/1.0 400 Bad Request");
echo "File transfer failed.";
}
} else {
header("HTTP/1.0 400 Bad Request");
echo "Access denied"; //reports if accesskey is wrong
}
?>
```
@Earn_Money_online, please keep yourself in your original post. If he had found a solution, for sure he would post in this (old) topic. I’ll close this.