IsDomain()
From Hack Wars Wiki
This function returns a boolean(true or false) if the given IP is a domain name or not.
boolean isDomain(string ip){ return (indexOf(ip,".hw",0)!=-1); }// end function |
Example (HTTP script)
boolean isDomain(string ip){ return (indexOf(ip,".hw",0)!=-1); } int main(){ string visitor=getVisitorIP(); if ( isDomain(visitor) ) mes = "This visitor has a domain name"; else mes = "This visitor has an IP"; message(getHostIP(),mes); } |
See getVisitorIP()
--Ltlwinters 01:16, 2 February 2009 (UTC)
