This works as well. <CFSET Temp = Replace(CGI.HTTP_REFERER,"http://","","ONE")> <CFSET ReferringDomain = Left(Temp,Find('/',"#Temp#")-1)>
~Dave -----Original Message----- From: Chris Alvarado [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 10:37 AM To: CF-Talk Subject: UDF to Parse URL Hello all, I am looking for a UDF that will parse the domain name (and hostname) from a URL string. I found the GetHostFromURL() function on CFLib. The function seems to work pretty well, it even strips port numbers etc. The problem with that function is that it will strip anything before the first "." if there is anything. So, http://www.something.com is returned as something.com . However I need the hostname as well. I would modify the existing function, however I am not too keen on RegEx atm. the UDF can be found here http://www.cflib.org/udf.cfm?ID=494 OR if anyone knows of something better, Im open to suggestions. and while on the topic can anyone point me at some good RegEx reference for CF? I really need to brush up in that area. Thanks all, -chris.alvarado [ application developer ] 4 Guys Interactive, Inc. http://www.4guys.com <http://www.4guys.com/> phone: 281.807.4344 x1716 fax: 281.807.4384 "We create websites that make you a hero." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4