RSS

How to upload an image to a PHP server In chunks from Window7 Mobile

19 Sep
<?php
foreach ($_GET as $key => $value) { eval("\$" . $key . " = \"" . $value . "\";");}
$filename = isset($_REQUEST["filename"]) ? $_REQUEST["filename"] : "jjj";
$append = $_REQUEST["append"];
if($code == "54m3xuzm97z30rdfsloegjizvzgga12bshptv59o")
{
    try
    {
        if(!$append)
            $file = fopen("fishups/" . $filename,"w");
        else
            $file = fopen("fishups/" . $filename,"a");  

        $input = file_get_contents ("php://input");
        fwrite($file,$input);
        fclose($file);
        echo "OK";
    }
    catch (Exception $e)
    {
        echo 'Caught exception: ',  $e->getMessage(), "\n";
    }
}
?>

For more click http://www.invulgo.dk/blog_PhotoUpload.php
 

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: