Created
April 11, 2011 12:04
-
-
Save dave1010/913402 to your computer and use it in GitHub Desktop.
See what web server a site is using and add it to a DB table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_start(); | |
passthru('curl -I http://www.reddit.com | grep Server | sed "s/Server: //"'); | |
$server = ob_get_clean(); | |
// http://xkcd.com/327/ | |
mysql_query("INSERT INTO servertypes (server) VALUES '$server'"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment