Re: pictures into mysql

From: Date: Wed, 19 Jul 2000 20:58:20 +0000
Subject: Re: pictures into mysql
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-1308@lists.php.net to get a copy of this message
Joel, Unless you have a specific need to do so, most people recommend that you save the file to a directory on your server's hard disk, and put a relative URL to the image in the database. This way, you can retrieve the src of the image, then link to it from there. There usually isn't any need to store the image in a database field. To copy the image within a script, you might try the command line program 'curl' to get the image. I've tried to do it in PHP with fsockopen() and fopen(), but I always have one byte wrong and the image is corrupted. Don't know why. Hans On Wed, 19 Jul 2000, Joel Schopp wrote: > I am trying to pull pictures off of a url and put them in a database, then > retrieve them. I have seen wonderful examples of how this can be done, > but it dosn't seem to work with php4pl2. Does anybody have any ideas that > I haven't tried yet? > > JOel > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > Hans Anderson ~ me@hansanderson.com PO Box 426, Missoula, MT 59806 | PHP, Search Engines, SQL (800)397-9116 / (406)549-6524 | Databases, Flash Multimedia, http://www.hansanderson.com | Killer Audio Production, http://www.goofiness.com | Minty Fresh Breath.

« previous php.db (#1308) next »