upload files to my server through url(internet)

Started on the old forum in March 2009 · view the original in the archive · old links redirect here

4 replies · 546 views · started 17 years ago · 1 min read

4 participants
nirav07 Newbie · 9 posts #1

plz give me php script from which i can directly upload files to my server through url(internet)

Plz explain how to make the script work also

morse Senior · 364 posts #2

search on the net for something called file snatcher, its probably shared and discussed here already, so use the search button 🙂

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

GumSlone Administrator Principal · 1,690 posts #3
$url = 'http://site.com/image.png';
$content = file_get_contents($url);
$filename = end(explode('/',$url));
$fp = fopen('directory/image.png', 'w'); // chmod 777 the directory
fwrite($fp, $content);
fclose($fp);

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

nirav07 Newbie · 9 posts #4

Thanks For the reply but where will be the uploaded file saved

strikingv Developer · 70 posts #5

it will be uploaded to directory folder of ur server

$url = 'http://site.com/image.png'; 
$content = file_get_contents($url); 
$filename = end(explode('/',$url)); 
$fp = fopen('directory/image.png', 'w'); 
fwrite($fp, $content); 
fclose($fp);

You should change the chmod of the directory specified in the bracket ('directory/image') to 777

😉

Or try this http://coding-talk.com/attachment.php?attachmentid=973&stc=1&d=1237695764

🤨

Attachments: filesnatcher.zip

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close