PHP code example of sodonnell / spacetrack

1. Go to this page and download the library: Download sodonnell/spacetrack library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sodonnell / spacetrack example snippets


composer 


dentials = [
    'username'=>'???your-username???',
    'password'=>'???your-password???',
];

$cookie = '/tmp/spacetrack.cookie.txt';

use SpaceTrack\SpaceTrack;

SpaceTrack::init($credentials,$cookie);

// optional parameter: decode JSON to PHP Array?
$decode=true;
$response = SpaceTrack::getLaunchSite($decode);

print_r($response);