Skip to main content

Free Code for WHMCS for WHOIS Lookup for .PK Domains

WHMCS VERSIONS BEFORE V 7


.PK is the TLD for Pakistan. Unfortunately, the registry has not set up a WHOIS server for looking up availability/whois of .pk domains. I have played with it and found the perfect solution.

Checking availability/whois for .pk, .com.pk.net.pk.org.pk.biz.pk, .fam.pk.web.pk and .edu.pk can be made possible by adding the following code into the includes/whoisservers.php file of WHMCS.

.pk|http://pk6.pknic.net.pk/pk5/lookup.PK?name=|HTTPREQUEST-Domain not found
.com.pk|http://pk6.pknic.net.pk/pk5/lookup.PK?name=|HTTPREQUEST-Domain not found
.net.pk|http://pk6.pknic.net.pk/pk5/lookup.PK?name=|HTTPREQUEST-Domain not found
.org.pk|http://pk6.pknic.net.pk/pk5/lookup.PK?name=|HTTPREQUEST-Domain not found
.edu.pk|http://pk6.pknic.net.pk/pk5/lookup.PK?name=|HTTPREQUEST-Domain not found
.web.pk|http://pk6.pknic.net.pk/pk5/lookup.PK?name=|HTTPREQUEST-Domain not found
.biz.pk|http://pk6.pknic.net.pk/pk5/lookup.PK?name=|HTTPREQUEST-Domain not found
.fam.pk|http://pk6.pknic.net.pk/pk5/lookup.PK?name=|HTTPREQUEST-Domain not found

Adding PK WHOIS Servers in WHMCS V 7.x

The WHOIS Server definitions shipped with WHMCS by default can be found in /resources/domains/dist.whois.json. This file should not be edited.

 

To add or edit whois server definitions, begin by creating a custom whois.json file located at /resources/domains/whois.json

Inside it, define the WHOIS servers you wish to use.

Below is a sample custom whois.json file defining the whois servers for .myextension and .myextension.comtypes is.comExtensions.com.com, and overriding the default whois server for .org

Sample whois.json Override File


[
    {
        "extensions": ".myextension,.myextension.com",
        "uri": "socket://whois.myextension.net",
        "available": "No match for"
    },
    {
        "extensions": ".org",
        "uri": "socket://whois.my-org-whois.net:96",
        "available": "NOT FOUND"
    }
]

A WHOIS Server definition is made up of four parts.

  • Extensions - A comma-separated list of extensions that this WHOIS server will be used for. In the above example, there are two WHOIS servers defined, but three extensions for which lookups are defined.
  • Server - This is the server that will be connected to. A whois-based server should begin with socket:// and a web-based request should begin with http:// or https://.: A port for the server can be provided using:pportt in this field.A
  • available - This is the string that WHMCS will match against to determine an available domain. This string must only appear in the output when the domain is available.


If you are still not able to do so, then please contact Navicosoft support at www.navicosoft.com

About.PK Domain

Navicosoft provides domain names in the PK ccTLD (country code Top Level Domain) namespace. This includes domain names with .pk, .com.pk, .net.pk,  .org.pk, .web.pk, .fam.pk, .edu.pk, as well as various government-only sub-domains like .gov.pk etc. Clients can buy domain names and additional services like web hosting directly here. 

ORDER a PKNIC Card Right Now For Only Rs. 3600


Which domain names can I choose?

In principle, you are free to choose the domain name. However, you cannot choose names that are in use by other organizations, or names that, for various reasons, are prohibited or reserved for technical, ethical, or national considerations. You also have a duty to ensure that your registration of a domain name does not infringe another party's right to the same name. Remember that the responsibility always rests with you. Here, you can read more about choosing a name.

All new domains that are registered under.PK must belong to one of the following second-level or third-level domains. General guidelines for each category are given below. Payment schedules for all the domain types are the same.

.PK

General Second Level

 Domains 

without .

com.pk 

etc Suffix

.COM.PK

General Business, or Individual

.NET.PK

Network Related Business

.ORG.PK

Non-profit Organizations

.FAM.PK

Family and Individuals

.BIZ.PK

General Business, Promotional

.WEB.PK

Web Sites

.EDU.PK

Educational Institutes

.GOV.PK

Domains 

for Government of Pakistan

.GOB.PK

Domains 

for Government of Baluchistan

.GOG.PK

Domains 

for Government of Gilgit Baltistan

.GKP.PK

Domains 

for Government of Khyber Pakhtunkhwa

.GOP.PK

Domains 

for Government of Punjab

.GOS.PK

Domains 

for Government of Sindh

.GOK.PK

Domains 

for Government of Azad Kashmir

Applications for these domains must conform to the PKNIC registration policy agreement in addition to the requirements given below. In the case of any difference between the PKNIC registration policy and the specific domain terms and conditions described below, these terms and conditions will apply.

  1. The maximum domain name length is 63 characters (excluding the .pk portion), and the maximum length is 67 characters, including the .pk suffix.
  2. For the second level.PK domains, the minimum length for the domain name, exclusive of the .pk portion, is four characters (e.g,. 1234.pk). A four-character name before .pk can not start with one of the PKNIC second-level sub-domains (e.g, .com, .net, .org, gov, .gop, etc.). For example, the following domain names are not acceptable:  (coms.pk, comm.pk, nets.pk, net2.pk, govs.pk, etc). The complete list of the.PK current and reserved sub-domains include, but are not limited to.EDU.PK, GOV.PK,.GOB.PK,.GOG.PK,.GKP.PK,.GOP.PK,.GOS.PK,.GOK.PK,.INFO.PK
  3. To help minimize website phishing attacks, the following restrictions are placed:
    • Any new domain registration, since August 2013, with a four-character name before .pk can not contain one of the PKNIC second-level sub-domains (e.g., com, net, org, gov, gop, etc).
    • Any new second-level domain registration, since May 2014, can not end with a reserved sub-domain for Government or Education (i.e., gov.pk, edu.pk, gop.pk, gos.pk, gob.pk, gog.pk, gok.pk, gkp.pk). Exceptions can be made for longer names whose meaning is not easily confused with government or educational functions.
  4. For the third level.COM.PK, etc, domains, the minimum domain name of one character is allowed (e.g., a.com.pk). The label "pk" and all the second-level suffix names are reserved for these domain types (e.g., can not register pk.com.pk, net.com.pk, com.com.pk, gov.com.pk, etc).
  5. A domain name can not begin with a dash "-", and can not have two consecutive dashes "--"in it. These are reserved for IDN encoding.s
  6. Generic dictionary words are allowed (unless they violate other terms set forth here or in the general PKNIC Registration Policy).
  7. The domain name is not present in the list of reserved or blocked names. Examples of reserved namespaces are INFO.PK, NAME.PK, etc.
  8. Domain names are not required to have pre-configured name servers for.


How do I find out if a .pk domain name is available?

 

To find out if a name is available or to find out who registered a particular name, use our WHOIS Search tool, which can be found on the home page of our website.

 

How much does a domain name cost?


 

For a domain registrant based in Pakistan, a domain fee per year will be charged. For a domain registrant or their registrar located outside Pakistan, a different fee per domain per year is charged. The fee is charged on a biennial basis (two-year period) and can be paid up to a maximum of ten years. 

 

How soon can I start using my domain name?

 

Once the Registry System has been updated, the information in our database is shared with the Internet's zone files worldwide. This sharing process is called 'propagation', because the new information about your Domain Name spreads or propagates across the Internet. The zone files are propagated frequently, every few hours. We cannot control the rate at which the millions of servers on the Internet are updated, but generally, your domain should be available to Internet users within a very short period.

 

Can I change the domain name?

 

Once a domain has been registered, its name can not be modified.

 

Why must I update registered data?

 

From time to time, it is necessary to reach a contact person for the domain. This could be due to technical problems or disputes. In these situations, the contact data must be up to date. As the domain name holder, you are responsible for keeping your contact information updated.