How to Load an URL in PHP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ebbalingur
    New Member
    • Oct 2008
    • 1

    How to Load an URL in PHP?

    Hello, and thanks for taking the time to see if you can help me!

    Okey, I need load an URL in php.

    Is there a way when someone comes to my site for example test.php I can make the php file load what ever url I want but not show it on the computer screen?

    Then when the loading is done it loads an image or something?

    Some one suggested using the header ("location: http://www.example.com ")
    But then it just loads that url, going away from mysite.com/test.php

    So is there away to keep them on my site but still fetch another url but not show it on the page until they click on something. Just load it and then if someone wants to see it, it's there already loaded and everything goes really fast.

    Any input would be great!

    regards,
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    You could try either the HttpRequest class (see HttpRequest::se nd for examples) or the Curl functions.

    Alternatively you could try doing this client-side using Ajax.

    Comment

    Working...