Skip to content

Instantly share code, notes, and snippets.

@tonypiper
Last active February 3, 2016 14:24
Show Gist options
  • Save tonypiper/1812f54be5ca1ac853ab to your computer and use it in GitHub Desktop.
Save tonypiper/1812f54be5ca1ac853ab to your computer and use it in GitHub Desktop.
PHP Version Inventory
<?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