DiZuM Posted March 21, 2007 Share Posted March 21, 2007 Ok, there it is: on *:SIGNAL:mta.command:{ var %a = $iif((!$4),$2,$iif($mta.getid($1,* $+ $4 $+ *),$v1,$2)) if ($3 == !trace) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else my.trace $1 %a } } alias my.trace { set %my.trace $1 $2 if (!$sock(my.trace $+ $mta.ip($1,$2))) sockopen my.trace $+ $mta.ip($1,$2) www.hostip.info 80 } on *:SOCKOPEN:my.trace*:{ tokenize 32 %my.trace if ($sockerr > 0) { sockclose $sockname mta.text $1 Trace: An error has occured. (socket error) } else { sockwrite -n $sockname GET api/get_html.php?ip= $+ $mta.ip($1,$2) $+ &display=whois HTTP/1.1 sockwrite -n $sockname Host: www.hostip.info sockwrite -n $sockname Connection: keep-alive sockwrite $sockname $crlf } } on *:SOCKCLOSE:my.trace*:{ unset %my.trace tokenize 32 %my.trace mta.text $1 $mta.nick($1,$2) - Country: $gettok(%my.trace.r,1,32) $+ , City: $gettok(%my.trace.r,2,32) } on *:SOCKREAD:my.trace*:{ var %t sockread %t if (Country isin %t) { set %my.trace.r $iif(Unknown isin %t,Unknown,$gettok(%t,2-,32)) } elseif (City isin %t) { set %my.trace.r %my.trace.r $iif(Unknown isin %t,Unknown,$gettok(%t,2-,32)) sockclose $sockname } } What is problem? Everything looks good, but still wont works. If you know solution, post here working one. ty. Link to comment
lil Toady Posted March 21, 2007 Share Posted March 21, 2007 after some researches i got that u need to use this url: http://api.hostip.info/get_html.php?ip= &display=whois and umm, im bored of helping with traces if really, everybody wants his own host Link to comment
DiZuM Posted March 22, 2007 Author Share Posted March 22, 2007 First, That http://www.hostip.info/api/ works too. I try use all of them, and it just wont works. Btw, if you found some php, cgi, htm script somewhere, i can host it into my HTTP server, and host own IP lookup place. So, please give me link, if you found good one what shows city too. Link to comment
Recommended Posts