Jump to content

Remotley hosting web stats


toxitalk

Recommended Posts

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.