---------------------------------------- > From: lord_farin@xxxxxxxxxxx > To: shreyasbr@xxxxxxxxx > Subject: RE: Urgent help - Token Generation code! > Date: Sat, 28 May 2011 00:41:02 +0200 > > > ---------------------------------------- > > Date: Sat, 28 May 2011 03:56:26 +0530 > > From: shreyasbr@xxxxxxxxx > > To: php-general@xxxxxxxxxxxxx > > Subject: Urgent help - Token Generation code! > > > > I am re-visiting the world of PHP after a really big hiatus and I am finding > > things veryslippery. Can someone please help me with the below code and let > > me know how I can print the token that is getting generated? > > > > I am using EasyPHP and I am trying to echo the $token but it wouldn't print > > anything. I am trying it as : http://localhost/token/URLToken.php. May I > > know where all I am going wrong here in my approach? > > > > > > > $sUrl = "/tstd_c_b1@s54782"; > > $sParam = "primaryToken"; > > $nTime = time(); > > $nEventDuration = 86400; > > $nWindow = $nTime + $nEventDuration; > > $sSalt = "akamai123!"; > > $sExtract = ""; // optional > > > > > > function urlauth_gen_url($sUrl, $sParam, $nWindow, > > $sSalt, $sExtract, $nTime) { > > > > > > > > $sToken = urlauth_gen_token($sUrl, $nWindow, $sSalt, > > $sExtract, $nTime); > > echo $token; > > There are two cases: > 1. You made a typo and meant 'echo $sToken;' on the above line instead > 2. You omitted the part where $token is defined and used > > > [More code that seemed fine] > > > > -- > > Regards, > > Shreyas Agasthya > > Best regards, > Jasper Mulder > I forgot to hit Reply All instead of Reply. I am deeply sorry for such a careless omission. Best regards, Jasper Mulder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php