Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Transfer file from a http address to a mysql database

images php coding issues or problems here.

Moderators: macek, egami, gesf

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
lbharti
New php-forum User
New php-forum User
 
Posts: 2
Joined: Mon Jun 27, 2005 2:44 pm

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 :)
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

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

Thank you, I think that should help.
lbharti
New php-forum User
New php-forum User
 
Posts: 2
Joined: Mon Jun 27, 2005 2:44 pm

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

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

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

forgot about that one: should work as well :)
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.