Jump to content


Photo

force REMOTE_ADDR to detect local IP address not IP public


  • Please log in to reply
1 reply to this topic

#1 lalu

lalu
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 21 October 2006 - 05:08 AM

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
<? $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>"; } ?>

and of course i try using htacces but also fail.
you can see the capture here: http://www.webdevelo...tachmentid=7817

Any other Solution? it will apreciate.
Thanks
Best Regards,

#2 lalu

lalu
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 22 October 2006 - 02:53 AM

Halo... any body there?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users