Jump to content


Photo

Remotley hosting web stats


  • Please log in to reply
3 replies to this topic

#1 toxitalk

toxitalk
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 10 June 2006 - 02:00 PM

Hi guys any info you can give would be great.

I want to write some php/mysql that I will host on my server (it has php and mysql on it)

so far I have written a hit counter app, that just records total hits. (which seeing as it works is cool)

I want to now go the full monty and do the same sort of thing that statcounter offers, that is from any webspace some javascript calls come php on my server to do all the bells and whistle thing.

The issues Im having it to do with two things.

1) Im using the http_referer, but all its returning is where the php is running from, not the remote webpage (the page Im trying to record the stats for). (whats the correct command and form I should be using).

2) if I can solve the above, then the next stage is to record the search engine refering(or other webpage) link that goes to the remote page in the first place.

So in away im trying to do a trace? (if that makes any sense) but with url instead of ip.

finally can you also obtain the search terms used to get to the remote page.


Many thanks

Mark.

#2 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 10 June 2006 - 02:16 PM

For one try
[a href=\"http://www.sitestats.com\" target=\"_blank\"]Site Stats[/a]
That might be something you will want to consider, other than that, I don't have a lot to offer other than some suggestions.

1. Possible have php pick up Ip address, browser version and model, and whatever else you can pick up and email it to a specific email address everytime they come, this could let you keep track of where they go. Or create a database, with lot of columns like
ip address(this will be your main field and what you sort by).
browser type
browser version
browser make
javascript enabled(can be picked up with javascript, and passed via variables into php, then used as information).
whether they have java enabled(have no idea)
and check for some other stuff like what operating system
then you can have a counter labeled
visits,
and if you want to get fancy 1 table for visits
with 1 column for each web page.
then when they enter it records a new number for that ip into the ip database, and you can tell how many time each ip address has visited each page, if you want to get even fancier maybe something to check and find out what order they went in, like have a control panel for yourself, where you can call the data from the database, and arrange it so that it appears based on ip, then IN ORDER what places they visited, maybe even record time and dates.

Another thing you could do is pick a webhost with good stats.
I use bluehost, but also there's isn't what I wanted.
You could also learn to read the log and be able to tell more from reading it than you could from stat informaiton.
Just some thoughts.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#3 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 10 June 2006 - 03:14 PM

For that you can use Awstats, Webalizer or similar ready-made script:

[a href=\"http://awstats.sourceforge.net/\" target=\"_blank\"]http://awstats.sourceforge.net/[/a]
[a href=\"http://www.mrunix.net/webalizer/\" target=\"_blank\"]http://www.mrunix.net/webalizer/[/a]

Although usually servers with PHP support do have these script installed.
~ D Kuang

#4 toxitalk

toxitalk
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 12 June 2006 - 08:37 AM

Sorted.
As stated I wanted to host stats for others (like statcounter).

Anyway to cut a long story short. I have done it with php and a little sprinkle of javascript. (with javascript on the client page you can grab current url and referer url, i then pass it to my php.- magic)

cheers anyway guys.

Mark





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users