Can someone help me to find what is wrong in the $secret
line ?
$secret
should give :
{"name":"JustAname","extra":"1","password":"ASD123","report":"http:\/\/website.com\/dev\/gamereport\/0001.php"}
here's the PHP code:
<?php
date_default_timezone_set('America/Montreal');
$name = 'JustAname';
$extra = '1';
$password = 'ASD123';
$reception = 'http:\/\/website.com\/dev\/gamereport.php';
// Code de génération de la base64
$secret = '{"name":"'.$name'","extra":"'.$extra'","password":"'.$password'","report":"'.$reception'"}';
$encodedSecret = base64_encode($secret);
$tournementLink = 'pvpnet://lol/customgame/joinorcreate/map1/pick6/team5/specALL/'.$encodedSecret;
echo $tournementLink;
?>
I got: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in [...] on line 20