Add-on modules

PKNIC (.pk domains) for CoreInto

Registers and manages .pk domains through your PKNIC SRS member account, and answers WHOIS lookups for .pk and its second-level extensions.

Price
Sold separately
Kind
Add-on module
Version
1.0.0
By
CoreInto

An add-on module for CoreInto, sold separately. It adds everything CoreInto needs for Pakistani .pk domains:

  • The PKNIC registrar (Settings > Domain Registrars > PKNIC (.pk)): registers .pk domains, re-assigns nameservers, syncs dates and status, checks availability, lists the domains held in your account for import, reads each domain's registrant, and shows your domain credit, all through your PKNIC SRS member account.
  • Registry presets for .pk and its second-level extensions, so Settings > Domain Pricing gets the right home country, two-year terms and documents rules in one click.
  • WHOIS for .pk and every second-level extension (.com.pk, .net.pk, .org.pk, .edu.pk, .ac.pk, .web.pk, .biz.pk, .fam.pk, .gov.pk, .gop.pk, .gos.pk, .gok.pk, .gkp.pk, .gob.pk, .gog.pk) on Utilities > WHOIS Lookup and in the store's domain search.

Without this module CoreInto has no .pk registrar and no PKNIC lookup. Pakistan as a country and the Easypaisa and JazzCash payment gateways are part of CoreInto itself and do not need it.

Installing#

  1. Copy the folder pknic into the modules folder of your CoreInto site (next to app), so that modules/pknic/module.php exists.
  2. In the admin area open Settings > Add-on Modules and press Activate beside "PKNIC (.pk domains)".
  3. Open Settings > Domain Registrars > PKNIC (.pk) > Set up, enter your SRS username and password and the contact numbers (see below), tick "Turned on", Save, and press Test Connection.
  4. On the same page tick the extensions you sell under "Extensions with their registry rules" and press "Use the ticked extensions". Enter their prices under Settings > Domain Pricing.

The "Configure" button on the Add-on Modules page leads to the registrar's settings.

Upgrading a site that used PKNIC before it became a module. The database update marks this module active when a PKNIC registrar is already set up. Copy the folder in as in step 1 and everything carries on: settings, domains and extensions are kept. Until the folder is there, the Add-on Modules page lists PKNIC as "Files missing", System Health warns "An active add-on module's files are missing: PKNIC (.pk domains)", and .pk domains and extensions show "registrar not available": their commands become staff tasks and saving them keeps the registrar.

Turning it off. Deactivate it under Settings > Add-on Modules. Its settings and data are kept; PKNIC disappears from Domain Registrars and Domain Pricing until it is activated again, and .pk WHOIS lookups go through CoreInto's own lookup (RDAP, then DNS).

WHOIS for .pk#

PKNIC has no WHOIS service on port 43, so a lookup of a .pk name uses, in order:

  1. PKNIC's public lookup page (https://pk6.pknic.net.pk/pk5/lookup.PK?name=...), asked over https. "Domain not found" means the name is free. Every informative line of the page is kept; menus, buttons and the copyright line are dropped.
  2. Your member record page, when the PKNIC registrar is set up and turned on and the domain is held in your account: the registrant (company and person), the agent, the create and expire dates and the nameservers, which the public page does not show. A failed sign-in never stops the lookup.
  3. DNS, for the nameservers of a domain the first two do not give them for, shown as Name Server: ns1.example.pk (from DNS). When the public page cannot be reached, nameservers in DNS still show the name as registered.

The answer is written as WHOIS-style lines: Domain, Status, Registrant, Agent, Create Date, Expire Date and Name Server lines, followed by any other lines the public page showed. The WHOIS page lists the module's extensions under "PKNIC (.pk domains)".

The PKNIC registrar#

PKNIC gives its SRS members a web dashboard (pk6.pknic.net.pk) and no programming interface, so the module signs in with the member's username and password and reads and fills the dashboard's pages the way a person would. Reading is always on: availability through the public lookup page, each domain's record page (dates, status, registrant), the domain list for import, and the credit balance (Rupees, Rupees Online and USD International, counted in domain credits).

FieldWhat it does
SRS username, SRS passwordThe dashboard sign-in. Stored encrypted.
Technical contact number for new domains, Billing contact number for new domainsThe numbers shown under My Technical Contacts and My Billing Contacts in the dashboard. Every registration uses them; the owner details come from the client. Registration refuses to run while they are empty.
Let CoreInto submit dashboard forms (register domains and re-assign nameservers)Off (the default): registrations and nameserver changes become staff tasks with every detail filled in. Turn it on after registering one test domain this way.
Warn staff when Rupees Online domain credit falls belowThe figure saved with the settings (default 20).

With form posting on, a registration reads the registration form, fills the domain, the registrant (the client's company or name, address, country, email, phone), the two contacts and a nameserver set, and sends it back with the dashboard's own hidden fields. Before that it checks the Rupees Online credit: when it is below what the order needs (one credit per two years), it stops with "Not enough PKNIC domain credit" and staff add credit and register again. If PKNIC asks for another step, the module stops and tells staff to finish it under Pending Domains on the dashboard, then press Sync.

Nameservers on PKNIC are numbered sets shared by many domains. To change one domain's nameservers the module re-assigns it to a set holding exactly those names, or creates a new set; it never edits a shared set.

The presets: .pk, .com.pk, .net.pk, .org.pk, .biz.pk, .fam.pk, .ac.pk with home country PK, 2 to 10 years in steps of two and automatic registration on; .edu.pk and the government extensions .gov.pk, .gop.pk, .gos.pk, .gok.pk, .gob.pk, .gkp.pk, .gog.pk with documents required, so they are always staff tasks. Renewals (PKNIC invoices paid from domain credit) and transfer codes (Get Authorization Code on the dashboard) are staff tasks too. If PKNIC adds a captcha or a second step to the sign-in, the module stops and asks staff to act. Never submit forms on the dashboard from a test install without the owner.

What it does not do yet#

  • Form posting (registering and re-assigning nameservers through the dashboard) is off until the owner has tried it with one domain.
  • Renewals, transfers, the registrar lock, contact changes and transfer codes are staff tasks: the staff task for a transfer code reminds staff to use Get Authorization Code on the dashboard.

Files#

FileWhat it holds
module.phpThe manifest (name pknic, title, version).
src/Module.phpThe module: its registrar and WHOIS hooks.
src/Registrar.phpThe PKNIC registrar (CoreInto\Mod\Pknic\Registrar): every page of the dashboard it reads or posts.
src/Lookup.phpWHOIS for .pk: the public page, the member record and DNS.