Skip to content

Instantly share code, notes, and snippets.

@isratmir
Last active October 20, 2016 08:46
Show Gist options
  • Save isratmir/52cf959be118843f6cf5d0c805954249 to your computer and use it in GitHub Desktop.
Save isratmir/52cf959be118843f6cf5d0c805954249 to your computer and use it in GitHub Desktop.
Server's ip address from PHP's CLI
<?php
$host = gethostname();
$ip = gethostbyname($host);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment