CMCLLC Posted May 4, 2010 Share Posted May 4, 2010 Ok so this game works perfectly fine on my own windows test box webserver but when I upload it to my website it doesnt work at all, It gives me the error in this php script, and iv determined the problem lies in the HTTP Referer method used, so is there any way to just remove this? Iv posted this on countless forums and received no help, All I want to do is remove the http referrer part and keep the functionality of the file, what the file does is genesis.php?action=login ect I just need it to still be able to do that just without checking your http referrer because my site messes it up somehow <? include("const.php"); /*(stristr($HTTP_REFERER,$SERVER_NAME)) ||*/ // && ($HTTP_REFERER) if ((strstr($HTTP_REFERER,"$httpref[1]")) or (strstr($HTTP_REFERER,"$httpref[2]")) or ($action == "top10") || ($action == "gameranks") || ($action == "login") || ($action == "signup") || ($action == "count") || ($action == "game")) { if (!$link = @mysql_connect($dbhost,$dbuser,$dbpass)) { include("html.php"); HTMLbegincompact("Database Error!"); print "The game database is currently unavailable. Please try again later.\n"; HTMLendcompact(); exit; } mysql_select_db($dbname); if ($action == "game") $action = "main"; include("$action.php"); } else { include("html.php"); HTMLbegincompact("Error!"); ?> <table> <tr><th style="color:#00006F;background-color:#FFFF9F">Security Violation</th></tr> <tr><td>We have determined that you are accessing the game the wrong way, or an error might have occurred.<br> <? if (!$HTTP_REFERER) print "You may NOT access in-game pages via bookmarks!<br>\n"; else print "You attempted to view this page from $HTTP_REFERER, which is not on $SERVER_NAME.<br>\n"; ?> If this error persists take the following steps in the following order:<br> 1) Return to <?=$config[home]?> and re-login.<br> 2) Upgrade your internet browser.<br> 3) Contact the game administrator at <?=$config[adminemail]?><br> 4) Contact your ISP.<br></td></tr> </table> <? HTMLendcompact(); } ?> Please help! Thanks Link to comment https://forums.phpfreaks.com/topic/200734-http-referrer-removal-from-script-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.