Last active
February 3, 2016 14:24
-
-
Save tonypiper/1812f54be5ca1ac853ab to your computer and use it in GitHub Desktop.
PHP Version Inventory
This file contains 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 | |
$data=array(); | |
$data['ipExternal']=file_get_contents("http://myip.dnsomatic.com/"); | |
$data['hostname']=trim(`hostname`); | |
$data['ipInternal']=gethostbyname($data['hostname']); | |
$data['php_version']= PHP_VERSION; | |
$data['mysql_version']=trim(`mysql --version`); | |
$ch=curl_init('https://zapier.com/hooks/catch/o149u0/'); | |
curl_setopt($ch,CURLOPT_POST,true); | |
curl_setopt($ch,CURLOPT_POSTFIELDS, $data); | |
curl_exec($ch); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment