Skip to content

Instantly share code, notes, and snippets.

@JKring
Created July 27, 2012 00:02
Show Gist options
  • Save JKring/3185325 to your computer and use it in GitHub Desktop.
Save JKring/3185325 to your computer and use it in GitHub Desktop.
fsockopen
$host = 'ssl://scripted.com';
$path = 'formats';
$fp = fsockopen($host,443);
fputs($fp,"GET $path HTTP/1.1\r\n");
fputs($fp,"Host: $host\r\n\r\n");
while(!feof($fp)){
echo fgets($fp,1024);
fclose($fp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment