Skip to main content

Robert Redl's Library tagged fsockopen   View Popular, Search in Google

Feb
8
2010

  • PHP make this very easy by including functions like file_get_contents() that has URL support. This code will get you the contents of an URL.

     
    $contents = file_get_contents('http://example.com/rss.xml');
      

    Unfortunately, this is a huge security threat - and many servers have disabled this feature in PHP. Also this is not the most optimized method to fetch an URL. Also, it is impossible to submit data using the POST method using this function.

      

    Other Options - curl and fsockopen

      PHP provide other two method to fetch an URL - Curl and Fsockopen. But to use this I have to write a lot more code.
1 - 1 of 1
Showing 20 items per page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo
Move to top