[PHP] Image and PHP
I have a page where i place an image but i want when i show the image delete it. How can i do this? -- Mario de Frutos Dieguez División de Ingeniería del Software y Comunicaciones CARTIF -Parque Tecnológico Boecillo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Image and PHP
On Thursday 14 April 2005 10:06, Mario de Frutos Dieguez wrote: I have a page where i place an image but i want when i show the image delete it. How can i do this? You want to delete it from the clients machine or what? -- Mario de Frutos Dieguez División de Ingeniería del Software y Comunicaciones CARTIF -Parque Tecnológico Boecillo -- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436 pgpXvgvK7G0wH.pgp Description: PGP signature
Re: [PHP] Image and PHP
Petar Nedyalkov escribió: On Thursday 14 April 2005 10:06, Mario de Frutos Dieguez wrote: I have a page where i place an image but i want when i show the image delete it. How can i do this? You want to delete it from the clients machine or what? -- Mario de Frutos Dieguez División de Ingeniería del Software y Comunicaciones CARTIF -Parque Tecnológico Boecillo Sorry, i want delete it from the server side. I put the images in a directory in the server. -- Mario de Frutos Dieguez División de Ingeniería del Software y Comunicaciones CARTIF -Parque Tecnológico Boecillo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Image and PHP
Mario de Frutos Dieguez wrote: Petar Nedyalkov escribió: On Thursday 14 April 2005 10:06, Mario de Frutos Dieguez wrote: I have a page where i place an image but i want when i show the image delete it. How can i do this? You want to delete it from the clients machine or what? -- Mario de Frutos Dieguez División de Ingeniería del Software y Comunicaciones CARTIF -Parque Tecnológico Boecillo Sorry, i want delete it from the server side. I put the images in a directory in the server. Try a wrapper script, that first outputs the image data, and then removes the file. somethinglike: img src=script_that_show_image_and_deletes_it.php?image=ladieda.jpg / Erwin Kerk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Image and PHP
Hi Mario you can use something like img src=blabla.jpg ONLOAD=delete_pic.php?fn=blabla.jpg And in delete_pic.php write something like: unlink ($_GET['fn']); -Original Message- From: Mario de Frutos Dieguez [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 10:53 AM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] Image and PHP Petar Nedyalkov escribi: On Thursday 14 April 2005 10:06, Mario de Frutos Dieguez wrote: I have a page where i place an image but i want when i show the image delete it. How can i do this? You want to delete it from the clients machine or what? -- Mario de Frutos Dieguez Divisin de Ingeniera del Software y Comunicaciones CARTIF -Parque Tecnolgico Boecillo Sorry, i want delete it from the server side. I put the images in a directory in the server. -- Mario de Frutos Dieguez Divisin de Ingeniera del Software y Comunicaciones CARTIF -Parque Tecnolgico Boecillo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Image and PHP -Correction
Correction : u need to use a hidden frame or iframe using style=display:none let call the hidden frame myhframe now in you code write img src=blabla.jpg onload = myhframe.location = 'delete_pic.php?fn=blabla.jpg' -Original Message- From: Sent: Thursday, April 14, 2005 1:20 PM To: 'Mario de Frutos Dieguez'; [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: RE: [PHP] Image and PHP Hi Mario you can use something like img src=blabla.jpg ONLOAD=delete_pic.php?fn=blabla.jpg And in delete_pic.php write something like: unlink ($_GET['fn']); -Original Message- From: Mario de Frutos Dieguez [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 10:53 AM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] Image and PHP Petar Nedyalkov escribi: On Thursday 14 April 2005 10:06, Mario de Frutos Dieguez wrote: I have a page where i place an image but i want when i show the image delete it. How can i do this? You want to delete it from the clients machine or what? -- Mario de Frutos Dieguez Divisin de Ingeniera del Software y Comunicaciones CARTIF -Parque Tecnolgico Boecillo Sorry, i want delete it from the server side. I put the images in a directory in the server. -- Mario de Frutos Dieguez Divisin de Ingeniera del Software y Comunicaciones CARTIF -Parque Tecnolgico Boecillo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Image and PHP
I have a page where i place an image but i want when i show the image delete it. How can i do this? What I would probably do is create a cleanup function/class in the script that gets a list of all the images in the directory in question and deletes anything that more then, say, an hour old. I don't like situations that may result the client not receiving data because the server was too fast or the client was too slow. So all you'll have to do is make sure you have a folder that only contains the images for this process and don't upload any other images to that folder. Simple enough. -M -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Image and PHP
--- Mario de Frutos Dieguez [EMAIL PROTECTED] wrote: I have a page where i place an image but i want when i show the image delete it. How can i do this? Some good suggestions so far but to be a little more explicit this is how you would do it. Essentially you want to have your image tag point to a script, have that script pass the image to the browser then delete the image. Please note, this example code, for simplicity sake, leaves out any security precautions. On you main page you'll have an image tag like: img src=show_image.php?image_name=some_image.jpg Then show_image.php will look something like this: ?Php $filepath = $_GET['image_name']; $fd = fopen($filepath,'r'); fpassthru($fd); fclose($fd); unlink($filepath); ? Remember though, as written you need to do some validation on $filepath, because as is, this script will pass anything to the user that is contained in $_GET['image_name'] then delete it, so be careful. -k. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] image through php
Hi! I want to use a code like: img src="./randomgif.php" I know, this is possible with perl, but with php? ... and it should be performant as well :-) !! thanks any hints appreciated witty -- Sent through GMX FreeMail - http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]