SSL Streams : fsockopen « File Directory « PHP






SSL Streams

 
<?php
$conn = @fsockopen('tcp://www.example.com', 80);
If (!$conn) die('Unable to connect to www.example.com');
fwrite($conn, "GET / HTTP/1.0\r\n");
fwrite($conn, "Host: www.example.com\r\n\r\n");
fpassthru($conn);
?>
  
  








Related examples in the same category

1.Outputting the Status Lines Returned by Web Servers
2.fsockopen() function establishes a socket connection, TCP or UDP.
3.fsockopen.php
4.Sockets Are Files
5.Scan a server
6.Retrieving a Web Page Using fsockopen()