Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Thanked 0 Times in 0 Posts

    Image through proxy

    Hello I have a member page and basically my question is I have a sql database set up with table name 'tz_pictures' with a row 'avatar' which the user then uploads from a form, and the profile pic location is saved to the avatar field. my question is right now the way im calling the picture to be displayed is:

    echo "<img src='http://www.site.com/".$row['avatar']."'>";

    how does one do a proxy so it functions like "www.website.com/file.php?id=?id"

    thank you for the help! you guys rock

  • #2
    Master Coder
    Join Date
    Jun 2003
    Cottage Grove, Minnesota
    Thanked 1,094 Times in 1,085 Posts
    Your script called "file.php" can generate the image on the fly.

    You have two choices though ...

    Using <img src .... > or include("script")

    Img src will use PHP GD to generate the image with the proper mime type.

    Include will include the output of the PHP script, which already contains the <img src> tag.


    Posting Permissions

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