Re: [PHP] Urgent help - Token Generation code!
Let me try and get back. Thanks, Jasper! On 28-May-2011, at 4:29 AM, Jasper Mulder lord_fa...@hotmail.com wrote: From: shreya...@gmail.com To: lord_fa...@hotmail.com Subject: Re: [PHP] 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: shreya...@gmail.com To: php-general@lists.php.net Subject: [PHP] 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
RE: [PHP] Urgent help - Token Generation code!
From: lord_fa...@hotmail.com To: shreya...@gmail.com Subject: RE: [PHP] Urgent help - Token Generation code! Date: Sat, 28 May 2011 00:41:02 +0200 Date: Sat, 28 May 2011 03:56:26 +0530 From: shreya...@gmail.com To: php-general@lists.php.net Subject: [PHP] 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
RE: [PHP] Urgent help - Token Generation code!
From: shreya...@gmail.com To: lord_fa...@hotmail.com Subject: Re: [PHP] 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: shreya...@gmail.com To: php-general@lists.php.net Subject: [PHP] 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