We can use PEAR (PHP Extension and Application Repository) for more real life application.
PEAR is a framework and distribution system for reusable PHP components.
D:\xampp\php\PEAR\Net\Curl.php <?php include_once("Net\Curl.php"); $c = new Net_Curl(); $c->Net_Curl([URL], $_SERVER['HTTP_USER_AGENT']); echo $c->execute(); ?>
This simple code spider the page as the other web browser do, even there is problems with Curl, Sockets etc.!