Skip to content

Instantly share code, notes, and snippets.

@martinjinda
Created November 13, 2017 14:55
Show Gist options
  • Save martinjinda/833ee552897b2e8e346daf3326f0541c to your computer and use it in GitHub Desktop.
Save martinjinda/833ee552897b2e8e346daf3326f0541c to your computer and use it in GitHub Desktop.
Find page title
<?php
$fp = fopen("http://www.example.com","r");
while (!feof($fp) ){
$page .= fgets($fp, 4096);
}
$titre = eregi("<title>(.*)</title>",$page,$regs);
echo $regs[1];
fclose($fp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment