Share this post! | Vote this! |
|
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.
PHP provide two method to fetch an URL - Curl and Fsockopen. But to use this we have to write a lot more code.
$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.PHP provide two method to fetch an URL - Curl and Fsockopen. But to use this we have to write a lot more code.
0 comments:
Post a Comment