jasper33
12-17-2007, 09:49 PM
Hi there, hoping someone can offer some help please
i have an ipb forum and have an external script which i want to read and decode the ipb cookie, and query the database to check if they are banned/registered etc.
i have tried to use the $_Cookie variable in a few ways, but it seems to come up empty.
$usercookie = $_Cookie['user'];
require('ipb_login_settings.php');
$cookie = base64_decode(addslashes($usercookie));
$cookie = explode("||", $usercookie);
$username = $cookie['1'];
$userid = $cookie['0'];
i notice throughout the other scripts a global $usercookie; but my external script cannot seem to see it?
Never dealt with this kind of thing before, i know the ipb cookie is base64 encoded, help appreciated.
ipb_login.settings.php contain the cookie_path etc and sql logins.
Edit - also like to say that the external script is on the same domain.
Thanks
i have an ipb forum and have an external script which i want to read and decode the ipb cookie, and query the database to check if they are banned/registered etc.
i have tried to use the $_Cookie variable in a few ways, but it seems to come up empty.
$usercookie = $_Cookie['user'];
require('ipb_login_settings.php');
$cookie = base64_decode(addslashes($usercookie));
$cookie = explode("||", $usercookie);
$username = $cookie['1'];
$userid = $cookie['0'];
i notice throughout the other scripts a global $usercookie; but my external script cannot seem to see it?
Never dealt with this kind of thing before, i know the ipb cookie is base64 encoded, help appreciated.
ipb_login.settings.php contain the cookie_path etc and sql logins.
Edit - also like to say that the external script is on the same domain.
Thanks