0

I am using timthump.php which is very handy in use, but problem with our use it, that we can not provide standard image location url.

In our situation we save images in database and then I have designed an php page which read id or name from query string then render image as response. where ever we need to get image, we use.

getmemberimg.php?id=1

While timthumb syntax look like this.

timthumb.php?src=image.jpeg

or

timthumb.php?src=https://xyzsite.com/image.jpeg

Now when I write my url as

timthumb.php?src=getmemberimg.php?id=1
timthumb.php?src=https://mysite.com/getmemberimg.php?id=1

this doesn't work and return error.

How Can overcome this issue? My Question is how to pass my image to timthumb.php while I can get image using getmemberimg.php?id=1...

sharafjaffri
  • 2,134
  • 3
  • 30
  • 47

1 Answers1

0

I don't know what timthumb.php is. However, if you want to get the output of a webpage (e.g. an image from getmemberimg.php?id=X) you can use file_get_contents or curl.


file_get_contents:

Show image using file_get_contents

http://php.net/manual/en/function.file-get-contents.php


curl:

http://www.bitrepository.com/download-image.html

http://php.net/manual/en/book.curl.php

Community
  • 1
  • 1
cmt
  • 1,475
  • 9
  • 11