Transfer file from a http address to a mysql database

images php coding issues or problems here.

Moderators: macek, egami, gesf

lbharti
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Jun 27, 2005 2:44 pm

Transfer file from a http address to a mysql database

Postby lbharti » Mon Jun 27, 2005 2:50 pm

Hi, I want to make a database of pictures which I want the php code to transfer from the given url like http://www.xyz.com/abc.jpg to a mysql database. I know how to upload a picture in a database but have no experience in transfering from an url automatically.

Thanks

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Mon Jun 27, 2005 3:41 pm

you need to read the file by using fopen and fread functions.. then store the whole data into the database..

read more about fread, fopen, fclose, feof functions on http://www.php.net in File section :)

lbharti
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Jun 27, 2005 2:44 pm

Postby lbharti » Wed Jun 29, 2005 10:52 am

Thank you, I think that should help.

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Wed Jun 29, 2005 10:16 pm


User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Thu Jun 30, 2005 1:19 am

forgot about that one: should work as well :)


Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest