View Full Version : Load Image

05-03-2006, 12:29 PM
Hey this is my first post so go easy on me :p

Ive been programming for awhile now in PHP, not really done much with images though so this is my question.

What I need to do. Is load a image from another website onto page on my website. Ill choose the google image for this one.

What I want to happen is the user enters the address of the image.
say http://www.google.co.uk/intl/en_uk/images/logo.gif

and then when the submit the form. Its loads into the page.

I want to do this because im looking to find the darkest point on the image.

any help would be really appreicated :D


05-03-2006, 12:33 PM
to load an image from an external page is easy

<img src = "<?=$_POST['imageurl']?>" />

but thats got nothing to do with finding the darkest point in the image...

05-03-2006, 12:34 PM
Yeah but I forgot to mention... I need to have it so it supports cookies. The image itself can only be view with the cookies from the previous page.

Yeah I tryed this but i get an error.


<img src = "<?=$_POST['http://www.google.co.uk/intl/en_uk/images/logo.gifl']?>" />


Parse error: parse error, unexpected '<' in /home/sherbz8/public_html/test.php on line 4

05-03-2006, 01:48 PM
dont use cookies.

and post the code I gave you as I gave it to you. Not wrapped in php tags and not replacing 'imageurl' with a url, 'imageurl' is the name of the field from the previous page