Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the real IP address in cgi chat

Status
Not open for further replies.

Al3inguy

Programmer
Nov 15, 2002
8
AE
Dear friends

i have a chat line and it's written in cgi and it contain this command (getip) it's used to get the real ip for the flooders and the trouble makers but, i want it to get the computer ip for the flooder ... to stop him from entering the chat this is the command code:

if($com[1] eq ""){
$err = "*** Sorry, no nick provided to get its real ip!";
}elsif(!(open(sss,"online/$com[1].txt"))){
close(sss);
$err = &quot;*** Sorry, nick <b>$com[1]</b> not found&quot;;
}else{
open(ddd,&quot;online/$com[1].txt&quot;);
flock(ddd,2);
$leinfo = <ddd>;
close(ddd);
@reinfo = split(/\|/,$leinfo);
if ($reinfo[8] >= 30) {
$reinfo[3] = &quot;#Blocked#&quot;;
open(privater,&quot;>>private/$com[1].txt&quot;);
flock(privater,2);
print privater &quot;<!-- $time --><font color=\&quot;ff0000\&quot;>*** Op $IN{'name'} ($IN{'rank'}) has checked your IP.</font>\n&quot;;
close(privater);
}

if ($reinfo[8] == 29) {
open(privater,&quot;>>private/$com[1].txt&quot;);
flock(privater,2);
print privater &quot;<!-- $time --><font color=\&quot;ff0000\&quot;>*** Op $IN{'name'} ($IN{'rank'}) has checked your IP.</font>\n&quot;;
close(privater);
}

if ($reinfo[8] == 28) {
open(privater,&quot;>>private/$com[1].txt&quot;);
flock(privater,2);
print privater &quot;<!-- $time --><font color=\&quot;ff0000\&quot;>*** Op $IN{'name'} ($IN{'rank'}) has checked your IP.</font>\n&quot;;
close(privater);
}

$err = &quot;*** <b>$com[1]</b>'s real ip is ($reinfo[3]).&quot;;
}






and thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top