how to get full url to image - function?

I am playing around & modifying my zenphoto install. I am trying to find a way to get the full complete url to the images as seen in my ftp program but can't manage it.

I tried <?php echo getProtectedImageURL();?> as I saw it is used on the image.php to click through to the image alone but no success at all.

To give you an idea of what I am trying to do, I am passing the image to another php page to modify it, my current code attempt is;

`

[code]

" target="_blank">modify

[/code]

`

Comments

  • just to clarify further, rather than this ;

    `

    "/gallery/zp-core/i.php?a=videogames%2Fgod+of+war&i=god+of+war.jpg&s=120"

    `

    i want this

    `

    http://www.mysite.com/gallery/videogames/godofwar/godofwar.jpg

    `
  • `echo getMainSiteURL()."/".getFullImageURL()` will return the image as seen from the browser, as something like http://www.website.com/gallery/albums/videogames/godofwar/godofwar.jpg

    Depending on your host's configuration where your website is basically mapped from a directory on another computer, your ftp program would probably look at a file location something like:
    /local/home/username/www.website.com/gallery/videogames/godofwar/godofwar.jpg and I don't know how to get that one out. In fact for security it may make more sense to prevent it getting out!
  • junko Member
    Hi guys,

    I want something similar to this.

    On `album.php`:

    I have a list of thumbnails of the images, clicking one image opens it in a Colorbox lightbox, but for that to work, you need a path to the .jpg/.png, rather than a `[...]/zenphoto/pre-wedding/img_0003.jpg.php`

    Thanks
  • There is a function to get that url. Please look in the functions guide.
  • Hi,

    I also get a problem with the last version of ZP. Even if I unprotected from hotlinking, I can't get the clean URL with getFullImageURL(). Where am I wrong ?

    Regards.
  • acrylian Administrator, Developer
    Example please... Make sure you don't have the html cache enabled.
Sign In or Register to comment.