lalu Posted October 21, 2006 Share Posted October 21, 2006 this is my real problem:i have website http://ex.axample.com (subdomain from example.com)now i dont want all my local network or internet to view it but only my local network with 192.168.10.* ip.and i use the following script to do that but the result is FAIL[code]<? $ipne = $_SERVER['REMOTE_ADDR']; require("includes/konpik.php"); $result = mysql_query("SELECT ipku FROM ip WHERE ipku = '$ipne'"); $num = mysql_numrows($result); if ($num != "0") { end_if; ?> <html> <head> <title></title> </head> <body> my index content here </body> </html> <? exit; } else { ?> <html><body bgcolor=000000 text=red> <center><b> <? echo "Auth code : $num<br>"; echo "Access from $ipne denied<br><h1> Forbidden Area</h1>"; } ?>[/code]and of course i try using htacces but also fail.you can see the capture here: http://www.webdeveloper.com/forum/attachment.php?attachmentid=7817Any other Solution? it will apreciate.ThanksBest Regards, Link to comment https://forums.phpfreaks.com/topic/24630-force-remote_addr-to-detect-local-ip-address-not-ip-public/ Share on other sites More sharing options...
lalu Posted October 22, 2006 Author Share Posted October 22, 2006 Halo... any body there? Link to comment https://forums.phpfreaks.com/topic/24630-force-remote_addr-to-detect-local-ip-address-not-ip-public/#findComment-112543 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.