Jump to content
  • Advertisement
Sign in to follow this  
Aprosenf

Is there a way to spoof the URL of an HTML file?

This topic is 4889 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Let me explain first what I'm trying to do. I'm trying to write a program that automatically posts data to a web form and displays the result. I can use curl to send the data alright, and I can pipe the response from the server and do whatever with it. The thing is, if I put it into a file and ask a browser to display it, relative links and images and other data won't resolve correctly - if it's looking for foo.jpeg, it won't find it on my hard drive. Is there a way to tell the browser, "Display this page as if it were www.foo.com/index.html for the purpose of resolving relative links and images?"

Share this post


Link to post
Share on other sites
Advertisement
I think you'll have to translate all adreses inside files to relative ones. Just like IE does it when saving a page.

Share this post


Link to post
Share on other sites
Isn't there _something_ like <link base="http://..."> ?
However, it wouldn't work for pages with absolute URLs anyway (will never do).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!