Question:
Web counter question.?
Rockinthebox Inc.
2012-07-02 06:40:05 UTC
Help! my blood pressure is going high from this! (ok deep breath) I am trying to install and web counter on my website. (you know the digital one) to keep track of the views. But I do not want the counter to count me<< (my views each time i log in). I have an IP address..just need a website that has this option. Help!
Three answers:
anonymous
2012-07-02 07:23:53 UTC
What do you mean by 'I have an IP address'...

IP addresses are mostly dynamic for a client(they keep changing)...

If by 'log in' you mean that you have added a user-authentication process then you can create an exception against your user name on the server-side:

eg: (in php)

if($user!='myname')

$counter ;



...and if by 'log in' you simply mean visiting the website, then sorry nothing can be done...

But be optimistic... You can let your counter ticking and boast about for having more visiters...

Good luck...
anonymous
2012-07-02 09:15:49 UTC
You meant that you have a static IP Address.. hmm ?



Then you can add an Exception in the counter for your IP.



Suppose, your counter executes with the php function init_websitecounter(), then you can do it like :



if ($_SERVER['REMOTE_ADDR'] == "your IP Address here")

{

// Don't start Counter

}

else

{

init_websitecounter(); // Start the counter

}



Hope you got it !
?
2012-07-02 07:24:53 UTC
Use PHP... something like ...



IF (!(isset($_SESSION['loggedin']))) /// if NOT logged in then...

{

/// Run your hit counter script here

}


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...