Retrieves the desired game embed url or embed code for the gameId provided. Only one or another is returned (url or embed_code), so your code should expect that. On DEV enviroment, you can test embed_code via the 914 gameid, In that case you will recieve a short youtube html embed code...
You can also use a fixed gameid by combining system and gametitle, for example ne#ne-attraction this way you're not tied to the ID of the game. |
public getGameDirect( int $gameid [, string $lang = string(2) "en" , string $play_for_fun = bool FALSE ] )
int
$gameid required - GameId you recieve from getGameList()string
$lang = string(2) "en" - Lang see getGame doc.string
$play_for_fun = bool FALSE - Play_for_fun see getGame doc.string
$homeurl - home/back buttonarray
- (url => url, embed_code => embed_code)Name | Value | Description |
---|---|---|
gamesession_id | string (255 characters) | enable tracking the player game sessions that is unique per game launch |
sessionid | string (255 characters) | enable tracking of player sessions that is unique per login |
Array ( [api_password] => xapitest [api_login] => xapitest [method] => getGameDirect [lang] => en //[user_id] => 123 //DEPRECATED [user_username] => domendomen2 [user_password] => 687ee8d988b2411bfc6983c4fca2f6c622819ac8 [gameid] => 568 [homeurl] => http://url.to.your.page.com [play_for_fun] => 0 [currency] => EUR ) |
{"error":0,"response":"https:\/\/www.game-program.com\/casino\/frontend\/EmbeddedGame\/EmbeddedGame.swf?gameId=99&gameSWF=thePiramid.swf&sessionHash=test ","new_parameter_example":"value_123","gamesession_id":"gs9834ndasd","sessionid":"123-898sdjkaERRA"} OR when embed_code is available: {"error":0,"response":{"embed_code":"<html>..."}} |
// returned url is to be embedded in this manner, or in a popup window `iframe src="http://www.example.com/"` |
public function getGameDirect($gameid,$lang = 'en',$play_for_fun = false){ if(is_numeric($gameid) && $gameid > 0){ return $this->client->getGameDirect($gameid,$lang,$play_for_fun); } } |