Hey,
I used this code for remote upload of pics
Downloading of pics from remote server to my image host.
My Image Host :
The Script is here :
It returns a HTTP Error 500 (Internal Server Error), while all the other pages on the same server load perfectly (htm, html and php pages)
if any one helps me out with this, i will surely put your name in the credits page on my site..
also , i wanted to know if the script displays the image link that has been uploaded.
Please help me out with this
Thanks,
SpeedBus
I used this code for remote upload of pics
Downloading of pics from remote server to my image host.
My Image Host :
Code:
www.imgair.net
The Script is here :
Code:
http://imgair.net/remote.php
It returns a HTTP Error 500 (Internal Server Error), while all the other pages on the same server load perfectly (htm, html and php pages)
Code:
<?php
function remoteUpload($url)
{
$newfname = "images/".str_replace('%20',' ',basename($url));
$file = @fopen ($url, "rb");
if($file)
{
$newf = fopen ($newfname, "wb");
if ($newf)
{
while(!feof($file))
{
fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
}
if ($file)
fclose($file);
if ($newf)
fclose($newf);
chmod($newfname,0755);
if(file_exists($newfname))
{
//add the image to your database
//print the path of the image
}
else
error('There was an error uploading that image.');
}
else
error("We're sorry, but there was a problem uploading that image. It probably has an incorrect extension.");
}
}
}
?>
if any one helps me out with this, i will surely put your name in the credits page on my site..
also , i wanted to know if the script displays the image link that has been uploaded.
Please help me out with this
Thanks,
SpeedBus