All pastes #737777 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-10-15 18:25 UTC
rendered paste body
<?php
// Display all errors and include the script
error_reporting(E_ALL);
require_once 'GameQ.php';

// Define a server
$servers['cssource'] = array('cssource', '205.234.153.44');

// Initialise library and set a high timeout (2 secs)
$gq = new GameQ;
$gq->setOption('timeout', 2000);

// Add the servers
$gq->addServers($servers);

// Send requests, parse data
$result = $gq->requestData();

// Check the server we defined earlier
if (empty($result['cssource'])) {
    echo 'Could not communicate with server.';
}
else {
    echo '<pre>'; print_r($result); echo '</pre>';
}
?>