API Client written in PHP

Category: Software and Systems Engineering
Author: Sean O'Donnell
Tue, Jul. 29th, 2014 @ 15:16:52 (MDT)

Thanks to the good fellows over at USSTRATCOM/JSPOC who oversee the (un-classified) orbital object tracking data, I was granted (civilian) access to their API. I decided to develop an API Client in PHP, since that was the only language that I didn't see an API Client for, at the time.

You can download the spacetrack PHP object from my github repository.

$ git clone

Below is a simple example of using the spacetrack class to retrieve data from the 'boxscore' API.

#!/usr/bin/env php
/** simple spacetrack API client script example using PHP/CLI scripting */
require 'spacetrack.php';
$spacetrack = spacetrack::getInstance();
$req_data = $spacetrack->api_call($api,$postdata,$decode);
print $req_data;

For more information about the API, please visit:

Copyleft (<) 1998-2019