示例#1
0
文件: daily.php 项目: Toxicat/dolumar
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
require_once __DIR__ . '/../bootstrap/bootstrap.php';
//define ('DISABLE_STATIC_FACTORY', true);
set_time_limit(600);
$game = new Dolumar_Game();
$server = Neuron_GameServer::bootstrap();
$server->setGame($game);
if (!defined('SERVERLIST_VISIBLE')) {
    define('SERVERLIST_VISIBLE', false);
}
function postRequest($url, $referer, $_data)
{
    // convert variables array to string:
    $data = http_build_query($_data);
    // format --> test1=a&test2=b etc.
    // parse the given URL
    $url = parse_url($url);
    if ($url['scheme'] != 'http') {
        die('Only HTTP request are supported !');
    }
    // extract host and path: