scarhand Posted December 10, 2008 Share Posted December 10, 2008 i am getting a forbidden error when i try and go to this type of URL: http://website.com/page.php?url=http://www.othersite.com yet i can access this URL fine: http://website.com/page.php why is this happening? Link to comment https://forums.phpfreaks.com/topic/136358-solved-forbidden-error-httpwebsitecompagephpurlhttpwwwothersitecom/ Share on other sites More sharing options...
trq Posted December 10, 2008 Share Posted December 10, 2008 What does page.php do with the $_GET['url'] variable? Link to comment https://forums.phpfreaks.com/topic/136358-solved-forbidden-error-httpwebsitecompagephpurlhttpwwwothersitecom/#findComment-711390 Share on other sites More sharing options...
scarhand Posted December 10, 2008 Author Share Posted December 10, 2008 What does page.php do with the $_GET['url'] variable? if (isset($_GET['url'])) { $url = $_GET['url']; $gfcontent = file_get_contents($url); echo $gfcontent; } else { die('no url specified'); } but it doesnt even work if i use, say, http://website.com/page.php?anythinghere=http://www.othersite.com, i still get a forbidden error Link to comment https://forums.phpfreaks.com/topic/136358-solved-forbidden-error-httpwebsitecompagephpurlhttpwwwothersitecom/#findComment-711391 Share on other sites More sharing options...
rhodesa Posted December 10, 2008 Share Posted December 10, 2008 do you have any mod_rewrites? also, try: http://website.com/page.php?url=http%3A%2F%2Fwww.othersite.com Link to comment https://forums.phpfreaks.com/topic/136358-solved-forbidden-error-httpwebsitecompagephpurlhttpwwwothersitecom/#findComment-711396 Share on other sites More sharing options...
scarhand Posted December 10, 2008 Author Share Posted December 10, 2008 thanks for the help but ive taken this in a different direction that uses POST instead of GET Link to comment https://forums.phpfreaks.com/topic/136358-solved-forbidden-error-httpwebsitecompagephpurlhttpwwwothersitecom/#findComment-711435 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.