Re: A work around my HTTP_REFERER Prob...
| From: | Jason Wong | Date: | Fri, 07 May 2004 12:37:29 +0000 |
| Subject: | Re: A work around my HTTP_REFERER Prob... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185608@lists.php.net to get a copy of this message | ||
On Friday 07 May 2004 20:05, Tristan.Pretty@risk.sungard.com wrote:
> > varibale called 'secure'
> > we asign that variable that value of '4654376534' and divide it by the
>
> day
>
> > (eg: if it's the 12th of may, we divide by 12.. 7th of June, we divide
>
> by
>
> > 7)
That would result in a floating point number ...
> > if (($code1 == $master_code) || ($code2 == $master_code) || ($code3 ==
> > $master_code)) {
... which does not lend easily to such comparisons.
If you're still intent on using this *ahem* 'security' scheme then I suggest
you use multiplication instead (just make sure that the largest number you're
processing is less than 2147483648 - or use the BCMath functions).
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
After all, it is only the mediocre who are always at their best.
-- Jean Giraudoux
*/