Jump to content
  • 0

.pk - domain availability check


Mehmood Ahmed

Question

Hi,

I want to add .com.pk in domain availability check. so as per blesta documentation in following file

/vendors/io-developer/php-whois/src/Iodev/Whois/Configs/module.tld.servers.json

we need to put whois line, but PKNIC has not provide whois server line.

In whmcs I am using following in dist.whois.json file and it works while searching .pk domains as well ordering

{
  "extensions": ".pk,.com.pk,.net.pk,.org.pk,.edu.pk,.gov.pk",
  "uri": "https://pk6.pknic.net.pk/pk5/lookup.PK?name=",
  "available": "Domain not found"
    }

but as I planned to shift bleta, in blesta whois file its not working, it tried in different ways but not working.

{"zone": ".pk", "host": "https://pk6.pknic.net.pk/pk5/lookup.PK?name="}

and

{"zone": ".pk", "host": "https://pk6.pknic.net.pk/pk5/lookup.PK"}

pls help

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Thanks for your reply Paul. I appreciate your help.

your provided solution is working. I put all extension as a separate

{"zone": ".pk", "host": "whois.pknic.net.pk"},
{"zone": ".com.pk", "host": "whois.pknic.net.pk"},
{"zone": ".net.pk", "host": "whois.pknic.net.pk"},
{"zone": ".org.pk", "host": "whois.pknic.net.pk"},
{"zone": ".edu.pk", "host": "whois.pknic.net.pk"},
{"zone": ".gov.pk", "host": "whois.pknic.net.pk"},
{"zone": ".biz.pk", "host": "whois.pknic.net.pk"}

 

 

Link to comment
Share on other sites

  • 0
On 9/15/2024 at 8:01 AM, Mehmood Ahmed said:

Hi,

I want to add .com.pk in domain availability check. so as per blesta documentation in following file

/vendors/io-developer/php-whois/src/Iodev/Whois/Configs/module.tld.servers.json

we need to put whois line, but PKNIC has not provide whois server line.

In whmcs I am using following in dist.whois.json file and it works while searching .pk domains as well ordering

{
  "extensions": ".pk,.com.pk,.net.pk,.org.pk,.edu.pk,.gov.pk",
  "uri": "https://pk6.pknic.net.pk/pk5/lookup.PK?name=",
  "available": "Domain not found"
    }

but as I planned to shift bleta, in blesta whois file its not working, it tried in different ways but not working.

{"zone": ".pk", "host": "https://pk6.pknic.net.pk/pk5/lookup.PK?name="}

and

{"zone": ".pk", "host": "https://pk6.pknic.net.pk/pk5/lookup.PK"}

pls help

The hostname should not include "https://" in it, here's an example of another TLD from the file:

{"zone": ".com", "host": "whois.verisign-grs.com"},

the host should be the whois server for the TLD. You'll need to add a line for each extension. I tried to find what the whois server is for .pk, but they seem to have implemented something non-standard, a webpage lookup essentially than a true whois.

However, I did a test with whois.pknic.net.pk and I got a response, so I would suggest trying it with that hostname.

# jwhois -h whois.pknic.net.pk domain.pk
[Querying whois.pknic.net.pk]
[whois.pknic.net.pk]
# WHOIS .PK Domains (PKNIC)

    Domain: domain.pk
    Status: Domain is Registered


    Creation Date: 2006-01-20
    Expiry Date: 2026-01-20
    Name Server: carol.ns.cloudflare.com
    Name Server: johnny.ns.cloudflare.com
    Name Server:
    Name Server:

So maybe something like this might work:

 {"zone": ".pk", "host": "whois.pknic.net.pk"},

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...