Getting host ip from PHP functions