PHP Code Samples using PEAR

Setting Up Your Environment to use the PHP Samples

Before you use the PHP examples, make sure you have PHP, PEAR and the HTTP_Request extension installed. The following may be helpful.

  1. First you need to download and install PHP. To learn more about installing PHP, see the following link: www.php.net
  2. Next, install PEAR for PHP. To learn more about installing PEAR, see the following link: pear.php.net/manual/en/installation.php
  3. Next, install the HTTP_Request extension. On Windows you would type >pear install --onlyreqdeps HTTP_Request

PEAR PHP sample files

You can download the code sample here

Note: In OGFRestAPI.php file, you need to replace the log in developerID and Password with your own developerID and Password

PHP Code Samples using CURL

CURL PHP sample file

You can download the code sample here

Note: In searchProcess.php file, you need to replace the log in developerID and Password with your own developerID and Password