Website Uploading

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 40
Joined: Fri Aug 09, 2002 11:53 am
Location: Rochester, NY

Website Uploading

Postby Kenneth » Mon Apr 07, 2003 7:07 pm


I am wondering, does anyone know how to upload files from a website to another? For example, on phpBB, you can upload an avatar image from another site by simply entering a URL with an image like: . I'm wondering, in PHP form, does anyone know how to do that using fopen(), and copy()? Could someone please show me an example using PHP? Thanks a lot!!

New php-forum User
New php-forum User
Posts: 16
Joined: Wed Feb 12, 2003 5:27 am
Location: Cornwall, England

fopen and fread

Postby andrewdavey » Wed Apr 09, 2003 2:39 am


You can probably fopen the url to the image file and use fread to get the entire file stored in a variable. Then fopen a new file on your server and fwrite the variable to that file. :D Phew! That should do it!

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 3 guests