RE: Urgent help - Token Generation code!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----------------------------------------
> From: shreyasbr@xxxxxxxxx
> To: lord_farin@xxxxxxxxxxx
> Subject: Re:  Urgent help - Token Generation code!
> Date: Sat, 28 May 2011 04:15:59 +0530
>
> Jasper,
>
> Tried echoing $sToken but wouldn't work.
>
> Regards,
> Shreyas
>
> On 28-May-2011, at 4:11 AM, Jasper Mulder 
> wrote:
>
> >
> > ----------------------------------------
> >> 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
> >>

As a second try, what happens if you add right here the line

$sGen = urlauth_gen_url($sUrl, $sParam, $nWindow, $sSalt, $sExtract, $nTime);

Because it seems as though you just declare three functions in the code
without calling them...

> >>
> >> 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
 		 	   		  
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux