Walled Posted July 19, 2016 Share Posted July 19, 2016 (edited) Hello freaks i need some php help for customize whois.php file , add this code function "?domain=google.com" after whois.php like: whois.php?domain=google.com example: http://www.rankanalysis.net/whois.php?domain=google.com whois.zip Edited July 19, 2016 by Walled Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/ Share on other sites More sharing options...
ginerjm Posted July 19, 2016 Share Posted July 19, 2016 Did you write this code? What do you need help with specifically? Since you didn't post it I can't see it but the question is rather vague. Perhaps you could POST the code and elaborate on exactly what you are trying to achieve, along with your attempted code so far? Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534647 Share on other sites More sharing options...
Muddy_Funster Posted July 19, 2016 Share Posted July 19, 2016 First post on a public forum and you're asking people to download a zip file? Sorry, I don't think so. Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534648 Share on other sites More sharing options...
ginerjm Posted July 19, 2016 Share Posted July 19, 2016 (edited) Didn't notice the ext. nor do I care. The poster needs to understand that not everyone willy-nilly clicks on attachments. That said - he/she should also show us the specific code that needs addressing by this forum and if he/she posts too much that will also be pointed out. I'm guessing that the poster did not write this code and basically knows very little PHP since the question appears to ask how to handle a query string from a url. A pretty basic question that any php coder should be able to handle. I await his/her response and we'll go from there. Edited July 19, 2016 by ginerjm Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534649 Share on other sites More sharing options...
Walled Posted July 19, 2016 Author Share Posted July 19, 2016 Didn't notice the ext. nor do I care. The poster needs to understand that not everyone willy-nilly clicks on attachments. That said - he/she should also show us the specific code that needs addressing by this forum and if he/she posts too much that will also be pointed out. I'm guessing that the poster did not write this code and basically knows very little PHP since the question appears to ask how to handle a query string from a url. A pretty basic question that any php coder should be able to handle. I await his/her response and we'll go from there. Hi ginerjm this section is (PHP CODING HELP ) RIGHT ?? i ask to coders to help me a simple code , whats wrong ??? the coders takes 2 minut or less to solve this job, u r writing your comment on my post takes 5 minute ,for just attack me First post i say Hello freak, i am feeling dont welcome on this forum thank you for no thing sorry bad english Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534654 Share on other sites More sharing options...
Walled Posted July 19, 2016 Author Share Posted July 19, 2016 (edited) First post on a public forum and you're asking people to download a zip file? Sorry, I don't think so. Hi Muddy YES, you are register to this forum for share your BLOG to get traffic ?? Edited July 19, 2016 by Walled Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534655 Share on other sites More sharing options...
Jacques1 Posted July 19, 2016 Share Posted July 19, 2016 This is a help forum, not a We-write-code-for-random-people-on-the-Internet forum. You are expected to turn your brain on and actively work on the problem. If you do that, you're welcome. If you're just here to show off your laziness and lack of respect, you should go somewhere else. Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534656 Share on other sites More sharing options...
Muddy_Funster Posted July 20, 2016 Share Posted July 20, 2016 Hi Muddy YES, you are register to this forum for share your BLOG to get traffic ?? And your point is caller? The link in my sig is to a reputable blogging host, not some random zip file that could contain god knows what viruses. I don't ask anyone to click the link in my sig and it's certainly not a requirement that people do it in order for help to be provided. You're comparing apples to oranges. To be honest I had forgotten it was even there, now you have reminded me I'll probably remove it as most of the content is seriously out of date. Hi ginerjm this section is (PHP CODING HELP ) RIGHT ?? i ask to coders to help me a simple code , whats wrong ??? the coders takes 2 minut or less to solve this job, u r writing your comment on my post takes 5 minute ,for just attack me First post i say Hello freak, i am feeling dont welcome on this forum thank you for no thing sorry bad english That's Right, it is "PHP Coding Help", but you didn't post any code and your not asking for help, your asking for someone to do the work for you. The point of this forum is to provide guidance and tuition for those that have hit a block in writing their own code. Commonly those proffering help on this forum will take the time and effort to write longer posts than just the fix requires, this is because just fixing things for people isn't a long term solution. It fixes the code, but not the underlying problem that caused the code to be an issue in the fist place. If you don't want help, just code, then go try another site. If you want real help however then suck it up and do what is asked. This is all for your benefit, not ours. Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534692 Share on other sites More sharing options...
Walled Posted July 20, 2016 Author Share Posted July 20, 2016 And your point is caller? The link in my sig is to a reputable blogging host, not some random zip file that could contain god knows what viruses. I don't ask anyone to click the link in my sig and it's certainly not a requirement that people do it in order for help to be provided. You're comparing apples to oranges. To be honest I had forgotten it was even there, now you have reminded me I'll probably remove it as most of the content is seriously out of date. That's Right, it is "PHP Coding Help", but you didn't post any code and your not asking for help, your asking for someone to do the work for you. The point of this forum is to provide guidance and tuition for those that have hit a block in writing their own code. Commonly those proffering help on this forum will take the time and effort to write longer posts than just the fix requires, this is because just fixing things for people isn't a long term solution. It fixes the code, but not the underlying problem that caused the code to be an issue in the fist place. If you don't want help, just code, then go try another site. If you want real help however then suck it up and do what is asked. This is all for your benefit, not ours. First i cant edit my post to add php code. Second REAL you talk too much , and worse time . you say (i ask to peoples for help me). what about you ? i dont ask you to write a negative comment on my post , keep your mind yourself. you are not welcome in my post BYE Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534698 Share on other sites More sharing options...
Walled Posted July 20, 2016 Author Share Posted July 20, 2016 (edited) WHOIS PHP <?php ####################################################################### # PHP Whois Lookup Class # Script Url: http://99webtools/php-whois-script.php # Author: Sunny Verma # Email: er.sunny.verma@gmail.com # Website: http://99webtools.com # License: GPL 2.0, @see http://www.gnu.org/licenses/gpl-2.0.html ######################################################################## class Whois{ private $WHOIS_SERVERS = array( "com" => array("whois.verisign-grs.com","whois.crsnic.net"), "net" => array("whois.verisign-grs.com","whois.crsnic.net"), "org" => array("whois.pir.org","whois.publicinterestregistry.net"), "info" => array("whois.afilias.info","whois.afilias.net"), "biz" => array("whois.neulevel.biz"), "us" => array("whois.nic.us"), "uk" => array("whois.nic.uk"), "ca" => array("whois.cira.ca"), "tel" => array("whois.nic.tel"), "ie" => array("whois.iedr.ie","whois.domainregistry.ie"), "it" => array("whois.nic.it"), "li" => array("whois.nic.li"), "no" => array("whois.norid.no"), "cc" => array("whois.nic.cc"), "eu" => array("whois.eu"), "nu" => array("whois.nic.nu"), "au" => array("whois.aunic.net","whois.ausregistry.net.au"), "de" => array("whois.denic.de"), "ws" => array("whois.worldsite.ws","whois.nic.ws","www.nic.ws"), "sc" => array("whois2.afilias-grs.net"), "mobi" => array("whois.dotmobiregistry.net"), "pro" => array("whois.registrypro.pro","whois.registry.pro"), "edu" => array("whois.educause.net","whois.crsnic.net"), "tv" => array("whois.nic.tv","tvwhois.verisign-grs.com"), "travel" => array("whois.nic.travel"), "name" => array("whois.nic.name"), "in" => array("whois.inregistry.net","whois.registry.in"), "me" => array("whois.nic.me","whois.meregistry.net"), "at" => array("whois.nic.at"), "be" => array("whois.dns.be"), "cn" => array("whois.cnnic.cn","whois.cnnic.net.cn"), "asia" => array("whois.nic.asia"), "ru" => array("whois.ripn.ru","whois.ripn.net"), "ro" => array("whois.rotld.ro"), "aero" => array("whois.aero"), "fr" => array("whois.nic.fr"), "se" => array("whois.iis.se","whois.nic-se.se","whois.nic.se"), "nl" => array("whois.sidn.nl","whois.domain-registry.nl"), "nz" => array("whois.srs.net.nz","whois.domainz.net.nz"), "mx" => array("whois.nic.mx"), "tw" => array("whois.apnic.net","whois.twnic.net.tw"), "ch" => array("whois.nic.ch"), "hk" => array("whois.hknic.net.hk"), "ac" => array("whois.nic.ac"), "ae" => array("whois.nic.ae"), "af" => array("whois.nic.af"), "ag" => array("whois.nic.ag"), "al" => array("whois.ripe.net"), "am" => array("whois.amnic.net"), "as" => array("whois.nic.as"), "az" => array("whois.ripe.net"), "ba" => array("whois.ripe.net"), "bg" => array("whois.register.bg"), "bi" => array("whois.nic.bi"), "bj" => array("www.nic.bj"), "br" => array("whois.nic.br"), "bt" => array("whois.netnames.net"), "by" => array("whois.ripe.net"), "bz" => array("whois.belizenic.bz"), "cd" => array("whois.nic.cd"), "ck" => array("whois.nic.ck"), "cl" => array("nic.cl"), "coop" => array("whois.nic.coop"), "cx" => array("whois.nic.cx"), "cy" => array("whois.ripe.net"), "cz" => array("whois.nic.cz"), "dk" => array("whois.dk-hostmaster.dk"), "dm" => array("whois.nic.cx"), "dz" => array("whois.ripe.net"), "ee" => array("whois.eenet.ee"), "eg" => array("whois.ripe.net"), "es" => array("whois.ripe.net"), "fi" => array("whois.ficora.fi"), "fo" => array("whois.ripe.net"), "gb" => array("whois.ripe.net"), "ge" => array("whois.ripe.net"), "gl" => array("whois.ripe.net"), "gm" => array("whois.ripe.net"), "gov" => array("whois.nic.gov"), "gr" => array("whois.ripe.net"), "gs" => array("whois.adamsnames.tc"), "hm" => array("whois.registry.hm"), "hn" => array("whois2.afilias-grs.net"), "hr" => array("whois.ripe.net"), "hu" => array("whois.ripe.net"), "il" => array("whois.isoc.org.il"), "int" => array("whois.isi.edu"), "iq" => array("vrx.net"), "ir" => array("whois.nic.ir"), "is" => array("whois.isnic.is"), "je" => array("whois.je"), "jp" => array("whois.jprs.jp"), "kg" => array("whois.domain.kg"), "kr" => array("whois.nic.or.kr"), "la" => array("whois2.afilias-grs.net"), "lt" => array("whois.domreg.lt"), "lu" => array("whois.restena.lu"), "lv" => array("whois.nic.lv"), "ly" => array("whois.lydomains.com"), "ma" => array("whois.iam.net.ma"), "mc" => array("whois.ripe.net"), "md" => array("whois.nic.md"), "mil" => array("whois.nic.mil"), "mk" => array("whois.ripe.net"), "ms" => array("whois.nic.ms"), "mt" => array("whois.ripe.net"), "mu" => array("whois.nic.mu"), "my" => array("whois.mynic.net.my"), "nf" => array("whois.nic.cx"), "pl" => array("whois.dns.pl"), "pr" => array("whois.nic.pr"), "pt" => array("whois.dns.pt"), "sa" => array("saudinic.net.sa"), "sb" => array("whois.nic.net.sb"), "sg" => array("whois.nic.net.sg"), "sh" => array("whois.nic.sh"), "si" => array("whois.arnes.si"), "sk" => array("whois.sk-nic.sk"), "sm" => array("whois.ripe.net"), "st" => array("whois.nic.st"), "su" => array("whois.ripn.net"), "tc" => array("whois.adamsnames.tc"), "tf" => array("whois.nic.tf"), "th" => array("whois.thnic.net"), "tj" => array("whois.nic.tj"), "tk" => array("whois.nic.tk"), "tl" => array("whois.domains.tl"), "tm" => array("whois.nic.tm"), "tn" => array("whois.ripe.net"), "to" => array("whois.tonic.to"), "tp" => array("whois.domains.tl"), "tr" => array("whois.nic.tr"), "ua" => array("whois.ripe.net"), "uy" => array("nic.uy"), "uz" => array("whois.cctld.uz"), "va" => array("whois.ripe.net"), "vc" => array("whois2.afilias-grs.net"), "ve" => array("whois.nic.ve"), "vg" => array("whois.adamsnames.tc"), "yu" => array("whois.ripe.net") ); public function whoislookup($domain) { $domain = trim($domain); //remove space from start and end of domain if(substr(strtolower($domain), 0, 7) == "http://") $domain = substr($domain, 7); // remove http:// if included if(substr(strtolower($domain), 0, 4) == "www.") $domain = substr($domain, 4);//remove www from domain if(preg_match("/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/",$domain)) return $this->queryWhois("whois.lacnic.net",$domain); elseif(preg_match("/^([-a-z0-9]{2,100})\.([a-z\.]{2,8})$/i",$domain)) { $domain_parts = explode(".", $domain); $tld = strtolower(array_pop($domain_parts)); $server = $this->WHOIS_SERVERS[$tld][0]; if(!$server) { return "Error: No appropriate Whois server found for $domain domain!"; } $res=$this->queryWhois($server,$domain); while(preg_match_all("/Whois Server: (.*)/", $res, $matches)) { $server=array_pop($matches[1]); $res=$this->queryWhois($server,$domain); } return $res; } else return "Invalid Input"; } private function queryWhois($server,$domain) { $fp = @fsockopen($server, 43, $errno, $errstr, 20) or die("Socket Error " . $errno . " - " . $errstr); if($server=="whois.verisign-grs.com") $domain="=".$domain; fputs($fp, $domain . "\r\n"); $out = ""; while(!feof($fp)){ $out .= fgets($fp); } fclose($fp); return $out; } } $whois=new Whois; echo $whois->whoislookup("google.com"); ?> Edited July 20, 2016 by Walled Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534700 Share on other sites More sharing options...
ginerjm Posted July 20, 2016 Share Posted July 20, 2016 OK - you wrote some code and more importantly, you posted it properly. Now - what exactly is the "problem"? Perhaps you could isolate the area of the code you are having difficulty with? Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534703 Share on other sites More sharing options...
Walled Posted July 20, 2016 Author Share Posted July 20, 2016 OK - you wrote some code and more importantly, you posted it properly. Now - what exactly is the "problem"? Perhaps you could isolate the area of the code you are having difficulty with? Hello Friend thanks for reply if i checked anydomain example: www.xxxx.com/whois.php?domain=anydomain.com dont work add this "?domain=anydomain.com" after whois.php example: http://www.rankanalysis.net/whois.php?domain=google.com thanks Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534705 Share on other sites More sharing options...
ginerjm Posted July 20, 2016 Share Posted July 20, 2016 I looked at your code. I have no idea what you are trying to do. Can you explain in plain English what you are doing without using code to make your point? I really don't know what you want. It appears you want to do something with a query string as I said before, but where does this come into play?? Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534706 Share on other sites More sharing options...
Walled Posted July 20, 2016 Author Share Posted July 20, 2016 (edited) closed post thanks Edited July 20, 2016 by Walled Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534708 Share on other sites More sharing options...
ginerjm Posted July 20, 2016 Share Posted July 20, 2016 You don't understand normal English. I asked for an explanation without using CODE and all you give me are sites which I choose not to click on. What do these sites have to do with your script? Don't answer that. Just explain what is going on here. Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534710 Share on other sites More sharing options...
Walled Posted July 20, 2016 Author Share Posted July 20, 2016 You don't understand normal English. I asked for an explanation without using CODE and all you give me are sites which I choose not to click on. What do these sites have to do with your script? Don't answer that. Just explain what is going on here. Closed post Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534712 Share on other sites More sharing options...
requinix Posted July 20, 2016 Share Posted July 20, 2016 Clearly OP doesn't have the understanding or the inclination to let us help him. Link to comment https://forums.phpfreaks.com/topic/301509-need-php-help-whois-script/#findComment-1534722 Share on other sites More sharing options...
Recommended Posts