chinchi86 Posted October 27, 2009 Share Posted October 27, 2009 Hello all, This is my code: $url = "userreview.php?reviewID=1"; $str = file_get_contents($url); echo $str; Simple, right? That's supposed to get the contents of userreview.php with reviewID as 1. But this doesn't work. Just typing userreview.php works, but the ?reviewID=1 does not work. How could I make it so that it works? Thanks Link to comment https://forums.phpfreaks.com/topic/179205-file_get_contents-not-working-for-some-reason/ Share on other sites More sharing options...
Bricktop Posted October 27, 2009 Share Posted October 27, 2009 Hi chinchi86, Try using the full URL in your $url variable, i.e.: $url = "http://www.yourdomain.com/userreview.php?reviewID=1"; Hope this helps. Link to comment https://forums.phpfreaks.com/topic/179205-file_get_contents-not-working-for-some-reason/#findComment-945501 Share on other sites More sharing options...
PFMaBiSmAd Posted October 27, 2009 Share Posted October 27, 2009 http://www.phpfreaks.com/forums/index.php/topic,273977.msg1294735.html#msg1294735 Link to comment https://forums.phpfreaks.com/topic/179205-file_get_contents-not-working-for-some-reason/#findComment-945512 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.