Skip to content
xYnta
Go to websitexynta.com
Search
EN

Downloading the API sample files

Updated on

To help you get started, we have written a PHP example for every action of the API. You can use the examples as they are or adapt them for your own software. The comments in the files and the variable names are in English.

Download the sample files (version 2025.1).

What is included

  • the examples folder with one PHP file per action, such as domains_check.php and domains_order.php;
  • examples/inc/global.php, in which you enter your UserID and IPHash;
  • examples/inc/functions.php, with the APICall function that sends every request to https://api.xynta.com.

Using an example

  1. Enter your details

    In examples/inc/global.php, put your UserID in $globalAPIUserID and your IPHash in $globalAPIIPHash. Where to find them is explained in Connecting to the API for the first time.

  2. Fill in the example

    Open the example of the action you want to use and fill in the empty fields, such as Domain and Tld.

  3. Run the example

    Run the example on the server whose IP address is on your whitelist. The response of the API ends up in the $curlResponse variable; add, for example, print_r($curlResponse); to see it.

What each action does, which fields it needs and which status codes it returns is in the API reference.

Related articles