[htdig3-dev] Tearing apart a URL from a certain point on.


Subject: [htdig3-dev] Tearing apart a URL from a certain point on.
From: Patrick (patrick@aol2.com)
Date: Wed Apr 05 2000 - 22:41:39 PDT


I have a problem in which my e-commerce software appends a
random "shopping cart ID". So for instance, the URL list
ends up looking something like this:

http://www.foo.com/system.cgi?item=12012&cart_id=123950 (32,752 bytes)
..
..
..
http://www.foo.com/system.cgi?item=12012&cart_id=439203 (32,752 bytes)

A duplicate record. I would like to strip out the cart_id. I
was hanging out in the htlib/URL.cc, where I had earlier created
a custom "strip_querystring" configuration parameter to completely
remove the query string from the URL; however, I only want to really
remove after seeing the word "cart_id".

strstr(haystack,needle) only allows my search string to be a single
character. I am wondering if anyone could help me do something like
this:

char *needle_position = strstr(ref,'cart_id')

..to return the position of that search string within ref. Thanks
in advance.

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
htdig3-dev-unsubscribe@htdig.org
You will receive a message to confirm this.



This archive was generated by hypermail 2b28 : Wed Apr 05 2000 - 21:41:26 PDT