Search code examples
phpquery-stringphpthumb

phpThumb plugin and database images' querystrings


i'm new to the phpthumb plugin and searched stackoverflow for similar questions without success

a standard phpthumb request should be like this

<img src="phpthumb/phpThumb.php?src=../RANDOM-IMAGE.gif&w=100&q=100" />

What if my image is coming from a mysql db and its url is a querystring?

<img src="http://www.somewebsite.com/gallery.php?img=PARAM1&id=PARAM2" />')

How can i generate thumbnails with phpthumb plugin with url like these?


Solution

  • I solved this way

    $imageTempURL=rawurlencode("http://www.somewebsite.com/gallery.php?img=imageID");
    
    
    echo('<img src="phpthumb/phpThumb.php?src='.$imageTempURL);