Getting image from url dynamically??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
maddali
Forum Newbie
Posts: 5
Joined: Fri Feb 12, 2010 8:44 am

Getting image from url dynamically??

Post by maddali »

Hi folks,

I'm stuck up with a function(or) code I need to implement.I need to get the images from an url(which actaully are in the local server) dynamically and display them as a thumbnail....here is the link I'm talking about to get a clear ideahttp://omars.gmu.edu/items...an image should be displayed on the left of every item that is displayed...

Here is how an image is to be retrieved...when I click on any item it redirects to another page,which on this page will be http://omars.gmu.edu/items/show/2536,when clicked on "Paper: "The Center for Interactive Management," October 1981"...When the page is scrolled down,an Identifier tag can be seen which has an url...when clicked on that,it again redirects to the link provided...the clickable version of the page is not updated yet...sorry for the inconvenience....Finally,this page contains some images,pdf,documents which should be displayed as a thumbnail in the browse items page I'm worrying abouthttp://omars.gmu.edu/items...

Any help is greatly appreciated....
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Getting image from url dynamically??

Post by Christopher »

In PHP you would use header() to set the image MIME type, size, etc. and use the readfile() function to read the image data from the file and send it to the browser.
(#10850)
maddali
Forum Newbie
Posts: 5
Joined: Fri Feb 12, 2010 8:44 am

Re: Getting image from url dynamically??

Post by maddali »

Thanks for the reply...But,how do we retrieve the image url(dynamically) that is on the remote server and get it displayed as thumbnail,that corresponds to each item...When I roll over my mouse over the different images,pdfs,docs in different items or collections,I noticed that they have some part of url in common,which are stored in the server...However,I couldn't manage to get a function that does my task,which I think is beyond my knowledge...could you please help me providing a sample code/function that works in my case....

Thanks,
Maddali
Post Reply