Re: Cheap and unique

2002-05-07 Thread Simon Oliver

> [EMAIL PROTECTED] wrote:
> >digest source might be able to locate the bits just by trying a lot of
> >them. I would expire them after a while just to prevent that from
> >happening by stating that if there is a 15 minute session, new random bits
> >are generated each five minutes.

I missed the start of this thread, but how about generating a new id (or
random bits) on every vists: on first connect client is assigned a session
id, on subsequent connects, previous id is verified and a new id is
generated and returned.  This makes it even harder to crack.

--
  Simon Oliver



Re: Client capabilities (and JavaScript)

2002-05-02 Thread Simon Oliver

Michael Nino wrote:
>
> If the browser is Lynx then send text only version otherwise send JavaScript
> browser "sniffer". The JavaScript sniffer can check for CSS, DHTML, DOM,
> plugins, etc... then redirect back to the server for the correct
> implementation.

Do you have a sniffer example - I have an idea for a module that
dynamically generates a sniffer/redirector.

--
  Simon Oliver



Re: Client capabilities

2002-04-30 Thread Simon Oliver

Martin Haase-Thomas wrote:
> 
> HTTP defines an 'Accept' header.
But that's not much use.  For example lynx replies with

HTTP_ACCEPT text/html, text/plain, image/*, image/jpeg, text/sgml,
   video/mpeg, image/jpeg, image/tiff, image/x-rgb, image/png,
   image/x-xbitmap, image/x-xbm, image/gif, application/postscript,
   */*;q=0.01

But it can't render images or postscript!

Your best bet is to use the HTTP_USER_AGENT header.  From this you can
work out what browser the client is using and marry this info with a
database of browser capabilities (Microsoft provide one for use with IIS).

The main problem is that a client can be modified from the "standard"
install to prevent JavaScript, StyleSheets, Images, etc and there is no
way to detect this server side.

You can detect JavaScript at the client side and redirect to a JavaScript
enabled URL or use the  tag to provide alternative content.

Again at the client side you can use DHTML to determine client
capabilities and redirect or display alternative content accordingly but
this will not work with all browsers, see:
  http://msdn.microsoft.com/workshop/author/clientcaps/overview.asp

--
  Simon Oliver



Re: Memory explodes loading CSV into hash

2002-04-29 Thread Simon Oliver

Have you tried DBD::AnyData?  It's pure Perl so it might not be as fast
but you never know?

--
  Simon Oliver



Global (to page) variables under Apache::ASP

2002-04-23 Thread Simon Oliver

In my httpd.conf I have set 'PerlSetVar UseStrict 1' because I always use
sctict anyway and I see in the docs that this might become the default
too.  So I always declare my variables with my().  

Suppose I have a master ASP file that includes other scripts and these
other scripts need access to the variables declrared in the master - no
problem.  But reading through the docs it looks like turning on
DynamicIncludes would save alot of memory and be generally more
efficient.  

Indeed, it would also "protect" the variables declared in one file from
another because the includes are compliled and called as seperate subs.  
And here lies the problem, how to declare a vaiable in the master ASP file
that is also in the scope of the dynamic include?

--
  Simon Oliver