RON_ron Posted September 6, 2012 Share Posted September 6, 2012 $place is not giving the expected output. I'm sure the issue is with the syntax? Could someone help me on this? $query = "SELECT * FROM db1 LEFT OUTER JOIN db2 ON db1.user = db2.User ORDER BY db1 user DESC"; $results = mysql_query($query); while($line = mysql_fetch_array($results)) { echo $line["user"]; echo $line["ip"]; $country = $line["ip"]; $place = file_get_contents('http://api.hostip.info/country.php?ip="$country"'); echo $place; } Link to comment https://forums.phpfreaks.com/topic/268077-file_get_contents-syntax-issue/ Share on other sites More sharing options...
Jessica Posted September 6, 2012 Share Posted September 6, 2012 $place = file_get_contents('http://api.hostip.info/country.php?ip='.$country); If you would use proper code tags, and in the future post the actual error, that will be good. Link to comment https://forums.phpfreaks.com/topic/268077-file_get_contents-syntax-issue/#findComment-1375804 Share on other sites More sharing options...
RON_ron Posted September 6, 2012 Author Share Posted September 6, 2012 thanks again jesirose! I'll keep that in mind... Link to comment https://forums.phpfreaks.com/topic/268077-file_get_contents-syntax-issue/#findComment-1375807 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.