Nice solution John. Thanks! Definitely different than mine.
I wonder if the regex gurus have a solution as well. ;)

-----Original Message-----
From: John M Bliss [mailto:[email protected]] 
Sent: Monday, August 23, 2010 1:00 PM
To: cf-talk
Subject: Re: Grabbing Keywords from Referers


This does (at least) Google.  Shouldn't be too difficult to extrapolate the
others...

<cfloop index="thisarg" list="#cgi.HTTP_REFERER#" delimiters="?&">
   <cfif ListFirst(thisarg, "=") is "q" and ListLen(thisarg, "=") is 2>
      <!--- then user searched for URLDecode(ListLast(thisarg, '=')) --->
      <cfbreak>
   </cfif>
</cfloop>

On Mon, Aug 23, 2010 at 11:52 AM, Che Vilnonis <[email protected]> wrote:

>
> I'm looking for a script to parse (yahoo,bing,google) keywords from 
> the cgi.http_referer variable preferrably done using CF's or a Java RegEx.
>
> Is there such a beast?
>
> TIA, Che



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336472
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to