Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Load Image

  1. #1
    New to the CF scene
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Load Image

    Hey this is my first post so go easy on me

    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

    shabba

  • #2
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,169
    Thanks
    19
    Thanked 65 Times in 64 Posts
    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...

  • #3
    New to the CF scene
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    PHP Code:
    <?php


        
    <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
    Last edited by shabba; 05-03-2006 at 11:40 AM.

  • #4
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,169
    Thanks
    19
    Thanked 65 Times in 64 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •