Login Register

Auto Submission

The auto submit feature allows you to add a game to your website with one click. You will first need to setup your account to use this feature. Simply add your script url to your account and you can add games to your site.

When you click the "add to site" link, Free Games For Your Website sends a http request to your script. The url is appended with the id of the game you selected.

With this game id, you can then access all of the games information using our feed system

<?php
if($_REQUEST['game_id'])
{
    
$game_id $_REQUEST['game_id'];

    
$url 'http://freegamesforyourwebsite.com/feeds/games/'.$game_id;

    
$ch curl_init();
    
curl_setopt($chCURLOPT_URL,$url);
    
curl_setopt($chCURLOPT_RETURNTRANSFER,true);
    
curl_setopt($chCURLOPT_CONNECTTIMEOUT,0);

    
$json curl_exec($ch);
    
$games json_decode($jsontrue);
}

From there you can add the game information to your database or just display it on the page. The information is returned in a JSON encoded array. The above script decodes the array so that you have access to all game information in one array.