[PHP] Shopping Carts and Sessions

2001-03-16 Thread DynamicHTML

Hi,

I have been playing around trying to build a 'perfect' shopping cart. A brief 
as possible feature list: database driven, fully indexable by search engines, 
and can operate without cookies.

I decided to use Apache's mod_rewrite to change a standard looking URL into 
something php can use easily.

   ex:  http://www.mydomain.com/produce/carrots/spec1/94d0bb50cd.html

would become

 http://www.mydomain.com/index.php?dept=produce&product=carrots&;
specials=spec1&PHPSESSID=94d0bb50cd

Now for the problem, when a search engine spiders this it will be including 
the session id. Unless I do some kind of checking, I could end up with 
multiple users having the same session id -- if they click into the site from 
a search engine or a bookmark.

The best solution I have come up with is to add a timestamp variable inside 
the URL. If the timestamp is more than 1 hour old -- reassign a new timestamp 
and session id then build the page as specified by the other variables passed 
to the script. 

I was wondering if anyone knows of a more elegant solution for this problem.

thanks,
don
 



Re: [PHP] Shopping Carts and Sessions

2001-03-16 Thread DynamicHTML

In a message dated 3/16/01 9:39:16 AM Eastern Standard Time, 
[EMAIL PROTECTED] writes:


> I thought Search engines couldnt spyder dynamic pages such as
> "1.php?foo=bar"
> 

True - but with the magic of Apache's mod_rewrite -- you can make a URL 
appear to a browser as: http://www.yourdomain.com/bar -- but on your server, 
it can be rewritten as: http://www.yourdomain.com/1.php?foo=bar.

mod_rewrite is extremely cool. you can read more about it at: 
http://httpd.apache.org/docs/mod/mod_rewrite.html

don



Re: [PHP] Shopping Carts and Sessions

2001-03-16 Thread DynamicHTML

In a message dated 3/16/01 2:02:07 PM Eastern Standard Time, 
[EMAIL PROTECTED] writes:


> Can this be used via .htaccess in a shared hosting situation?
> 

I believe it can -- never done it personally though...


don



Re: [PHP] Example high-profile PHP sites

2001-07-26 Thread DynamicHTML

Capital One (www.capitalone.com) is using some PHP...