> furst part since I only need the helloall.com.  All of our domains are
> going to the same place so I need to see which domain they typed in.  So
> how do I parse that?

Assuming the sub-domain will always just be one level deep:

<CFSCRIPT>
if (ListLen(CGI.Server_Name, '.') GT 2) {
        XServer_Name = ListDeleteAt(CGI.Server_Name, 1, '.');
} else {
        XServer_Name = CGI.Server_Name;
}
</CFSCRIPT>

-Cameron

--------------------
Cameron Childress
elliptIQ Inc.
p.770.460.1035.232
f.770.460.0963
--
http://www.neighborware.com
America's Leading Community Network Software





> -----Original Message-----
> From: Joel Blanchette [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 1:54 PM
> To: CF-Talk
> Subject: A couple questions for you guys
>
>
> Hello All,
>       I have a couple questions for you guys.  I am setting up a stats
> system for a couple doamins we own. Now the first question:
>
> If I grab the domain name (CGI.Server_Name) I need to put this in all
> lower case.  Not a prob;em with Lcase.  But also on the domain we have a
> wildcard.  So lets say that the domain is helloall.com.  If someone
> types in hgyrtiweowsnm.helloall.com I need coldfusion to rip out the
> furst part since I only need the helloall.com.  All of our domains are
> going to the same place so I need to see which domain they typed in.  So
> how do I parse that?
>
> Second question.  This is for the stat pull of the info.
>
> I have two tables
>
> Domains
>
> ID DomainName
> 1  helloall.com
> 2  allhello.com
>
>
> And the actuall stats
>
> ID  DomainID  HitMeOn                IPAddress   URLRef
> Browser
> 1    1         2002-02-01 15:04:37    10.0.0.1    www.yahoo.com    MSIE
> 5.5
> 2    1         2002-02-01 15:04:37    10.0.0.1    www.yahoo.com    MSIE
> 5.5
> 3    2         2002-02-01 15:04:37    10.0.0.1    www.yahoo.com    MSIE
> 5.5
>
>
> So what I need to do is make up a page that will give me the unique hits
> for one day.  Per domain.  And sort them in the higher one at the top.
>
> So it would look something like this on the result page
>
> Domain - Helloall.com 1 unique and 2 un-unique
> Domain - allhello.com 1 unique and 1 un-unique
>
> What would be the cfquery that I would use to do this???
>
> Thanks for all the help!!
>
> Joel
>
> 
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to