Hi Friends, please i want code for displaying the image in a page using get Method. for better understanding of my question please see this link http://tollywoodblog.in/img.html?si=http://2.bp.blogspot.com/-gLh5hqlFygM/TqhCr6ZOFEI/AAAAAAAAQvs/elrmPeoCeJU/s1600/vedika_latest_beautiful_photos_stills_001.jpg In the above link, image url given by get Method for viewing Image. So i want similar one.. please some one help..
To simply load an image using the $_GET global is quite easy. Something like this should get you started. if(isset($_GET['image'])) { echo '<img src="'.strip_tags($_GET['image']).'"/>'; } PHP: You would call the script like this: http://yourdomain.com/image.php?image=http://link-to-image-here Hope this helps to get you started
Hi Friend, thank for the code. It worked fine for the images which are in parent directory. But if want use the outside images, i was unable to see the images. the code not working.. please can u provide me for the images which are not on my domain..
The code works fine but as you are using the $_GET method you are limited to the amount of characters you can use. An alternative would be to post the image url in a form field. I just tested this locally and it worked fine: http://yourdomain.com/image.php?image=http://binevils.webs.com/youtube-logo(2).jpg Code (markup):