API PHP example


In order to run this example, you will need:


Download ExamplePHP.zip. This example contains the following files:

  • ExamplePHP.php
  • readme.txt
Running the example

To run the example, place the file on your PHP enabled server. The URL to request is hardcoded in the source as the $URL variable. If you encounter any class not found errors, verify that you have the cURL and DOM libraries installed.

The source code

This example uses PHP's cURL and DOM libraries to request and parse the XML.


This function uses cURL to request the XML. The resulting XML is returned as a String.


This function takes the XML String and parses it into a DOMDocument.


This function uses the DOMDocument to access the XML as a DOM tree. Nodes of the tree are retrieved by name and looped through to output the form result's information.

Over 1 Billion forms submitted