Jump to content

Recommended Posts

I am having difficulty working out how to grab from a URL within a URL a link to an image and display this image on a webpage.

example:

 

http://domainA.com/page1.php?file_image=http://domainB.com/image.jpg

 

I know little of this the code below but this is not working:

 

<?php echo $_GET['file_image']; ?>

 

this just copies the url, whereas I want to display this image.jpg from domainB using image source by grabing it.

<img src=" ">

 

I hope you understand me.

Link to comment
https://forums.phpfreaks.com/topic/233141-_get-command-help/
Share on other sites

  • 1 year later...

I have a new query with reference to above slightly modified.

 

(reference from above: http://domainA.com/page1.php?file_image=http://domainB.com/image.jpg)

 

I now would like to know coding how to insert a hidden field within a simple href URL so that on clicking that URL it goes to the next page with the contents of 'file_image' copied to the end of the URL of the next page so e.g it becomes:

 

http://domainA.com/page2.php?file_image=http://domainB.com/image.jpg

 

I tried the code below but no luck:

 

<a href='page2.php' input type="hidden" name="file_image" value="<?php echo $_GET['file_image']; ?>">page 2</a>

 

Hope it makes sense.

Link to comment
https://forums.phpfreaks.com/topic/233141-_get-command-help/#findComment-1346809
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.