Skip to content

Instantly share code, notes, and snippets.

@madeinnordeste
Created October 18, 2016 16:32
Show Gist options
  • Save madeinnordeste/02f129646023e3b4ec1fefbac0f9922d to your computer and use it in GitHub Desktop.
Save madeinnordeste/02f129646023e3b4ec1fefbac0f9922d to your computer and use it in GitHub Desktop.
Get Logme.in Hamachi IP from machine with PHP
<?php
// Hamachi Website - https://www.vpn.net/
$command = "ifconfig ham0 | grep 'inet end.' | cut -d: -f2 | awk '{ print $1}'";
$ip = shell_exec($command);
echo "Hamachi ip: ".$ip;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment