Counter Script |
||
Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.
In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.
Zymic Webmaster Forums Zymic Free Web Hosting Tutorials |
||
3 Pages
< 1 2 3 >
|
![]() |
Counter Script |
||
Apr 27 2009, 11:27 PM
Post
#21
|
|
![]() Member ![]() ![]() Group: Members Posts: 99 Joined: 14-November 08 From: New Brunswick, Canada Member No.: 68,991 |
im not sure I understand the config.php file. I have $host set to 'local host', but for $username, $password, $db_name, do I just make something up? or are they specific values? if so, where and how do I set them in the first place?
I've googled and serched but no one is very descriptive about this. thanks |
|
|
Apr 28 2009, 07:13 PM
Post
#22
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,562 Joined: 19-September 07 From: Rochester, NY Member No.: 86 |
At first, you want to set your host to 'localhost' and not 'local host.' If you use space, it will take it as a different value. Secondly, the username, password, and database name depends on the database you have created before hand. If you are hosted on Zymic, you can view the tutorial on how to create a database by Andrew. If you are hosted on cPanel, then you will need to follow the tutorial here. In both cases, you will need to manually import the sql information using phpmyadmin.
If you need any further help, feel free to PM me. |
|
|
Jun 7 2009, 07:16 AM
Post
#23
|
|
|
Newbie ![]() Group: Members Posts: 25 Joined: 7-June 09 Member No.: 98,297 |
Nice tutorial, but is it possible to show the IP and the location. i mean at least, like from europe , asia or america
|
|
|
Jun 9 2009, 02:38 AM
Post
#24
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,562 Joined: 19-September 07 From: Rochester, NY Member No.: 86 |
Do you mean you want to restrict the counter to keep track of only UK visitors or keep a log of accessed IPs? Or is it that you want to show the visitor their IP and the country they are in?
|
|
|
Jul 24 2009, 10:50 AM
Post
#25
|
|
|
Newbie ![]() Group: Members Posts: 4 Joined: 24-July 09 Member No.: 104,106 |
use this instruction properly step by step the work properly for creative minder
|
|
|
Sep 28 2009, 02:31 PM
Post
#26
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,562 Joined: 19-September 07 From: Rochester, NY Member No.: 86 |
Just don't follow the tutorial. The objective of us writing the tutorial is to teach you how to achieve something. From there on we hope for the readers to go beyond and develop something more complex. Take for example a grid book. There are many many pages, but the first two pages of a grid book is always instructions. This tutorial is the the instruction page and what you do next will fill up the pages within.
|
|
|
Jan 8 2010, 10:58 PM
Post
#27
|
|
|
Newbie ![]() Group: Members Posts: 5 Joined: 8-January 10 From: UK, South England Member No.: 125,462 |
"you are missing this." ...
A Thankyou from Me, Matt |
|
|
Jan 12 2010, 03:16 PM
Post
#28
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,562 Joined: 19-September 07 From: Rochester, NY Member No.: 86 |
Where am I missing: "you are missing this." ...?
|
|
|
Jan 20 2010, 06:37 AM
Post
#29
|
|
|
Newbie ![]() Group: Members Posts: 2 Joined: 20-January 10 Member No.: 127,078 |
Thank you for tutorial
|
|
|
Jan 20 2010, 06:41 AM
Post
#30
|
|
|
Newbie ![]() Group: Members Posts: 2 Joined: 20-January 10 Member No.: 127,077 |
pretty glad to know that..
|
|
|
Apr 7 2010, 02:05 PM
Post
#31
|
|
|
Newbie ![]() Group: Members Posts: 2 Joined: 7-April 10 Member No.: 137,504 |
Hi
I`ve got a problem. I put the CODE //Display general stats <?php include("stats.php"); ?> //Display online users <?php include("useronline.php"); ?> - stuff in a side. But when I open it, it just shows // Display general stats // Display online user .. On the other hand, it shows the following "text" when I open - stats.php: Notice: Undefined variable: visits in /www/zxq.net/s/e/c/xxx/htdocs/stats.php on line 19 Total Hits: 3012 Unique Hits: 2 And useronline.php: Notice: Undefined variable: REMOTE_ADDR in /www/zxq.net/s/e/c/xxx/htdocs/useronline.php on line 12 Notice: Undefined variable: PHP_SELF in /www/zxq.net/s/e/c/xxx/htdocs/useronline.php on line 12 Notice: Undefined variable: PHP_SELF in /www/zxq.net/s/e/c/xxx/htdocs/useronline.php on line 16 Users Online: 1 Viewing This Page: 1 ...So, I can`t see where the problem is. By the way, I replaced my sideaddress with xxx, because I don`t want to publicize it yet I also checked the lines, where the problem should be, but I can`t see any mistakes. I hope that someone can help me. .. and sorry for my primitive english |
|
|
Apr 13 2010, 04:48 PM
Post
#32
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,562 Joined: 19-September 07 From: Rochester, NY Member No.: 86 |
Did you follow all of the steps carefully? It's strange that the those two functions are undefined for you, whereas I installed the same archive and it works just fine. Make sure that you create the database, add the correct database information in the config.php (example below) and that you import the sql file included in the archive or input it via query. Also make sure the file you are using the php include function is in PHP.
Zymic's 99K.org config.php CODE $host = 'localhost'; // your host $username = '######_stat'; // databse username # corresponds to your user number found when you create a new user $password = '********'; // database password $db_name = 'username_99k_stats'; // database name, replace username with your site's url name Working demo on Zymic's server: http://sazzad.99k.org/ |
|
|
Apr 14 2010, 02:48 PM
Post
#33
|
|
|
Newbie ![]() Group: Members Posts: 2 Joined: 7-April 10 Member No.: 137,504 |
I followed all the steps carefully, but it still didn`t work.
I put "error_reporting(0);" at the beginning of the script, and it works now without any problems. |
|
|
Apr 16 2010, 10:33 PM
Post
#34
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,562 Joined: 19-September 07 From: Rochester, NY Member No.: 86 |
That doesn't really solve the problem, all you're doing is just disabling any error reports.
|
|
|
May 3 2010, 12:57 AM
Post
#35
|
|
|
Newbie ![]() Group: Members Posts: 3 Joined: 30-April 10 Member No.: 140,323 |
I have a problem. I added the code to the stats.php and the useronline.php then I had to rename my index.html file to index.php because it had php code. So when I go to my index.php it shows the code on my homepage. I am very new to PHP so I am prolly dumb and copy and pasted in the wrong spot.
I guess I am confused about the files being there and not accessing them. Are they supposed to be INCLUDED somewhere in the page that they are to be displayed? |
|
|
May 5 2010, 10:21 PM
Post
#36
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,562 Joined: 19-September 07 From: Rochester, NY Member No.: 86 |
If you have an index.php file all you need to do is include the stats and usersonline page using the php include function. You can place it anywhere. It's somewhat like an image. You use image tags to put it on your page. You can do the same in this case with the stats files. Sorry for the delay in response. Too much work to do.
|
|
|
May 11 2010, 10:53 AM
Post
#37
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 11-May 10 Member No.: 141,617 |
i have tried that but i m stuck some where..gone blow out my mind with this puzzle.....
Reason for edit: Please do not quote the entire article - Staff
|
|
|
May 12 2010, 01:17 PM
Post
#38
|
|
|
Newbie ![]() Group: Members Posts: 5 Joined: 12-May 10 Member No.: 141,749 |
I dont like mysql counters, better to use txt examples, like thoose PHP counter examples
|
|
|
May 17 2010, 03:22 PM
Post
#39
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,562 Joined: 19-September 07 From: Rochester, NY Member No.: 86 |
I'm not too familiar with Python and the main objective of this tutorial was to teach people the method of creating a counter script using php and mysql since it is readily available on Zymic.
|
|
|
Jul 17 2010, 12:53 PM
Post
#40
|
|
|
Member ![]() ![]() Group: Members Posts: 43 Joined: 6-June 10 Member No.: 144,748 |
ty for this, not tried yet but im learning more and more php, reading this Tutorials even if it goes slow lol, the download link do not allow me to download the files, owell guess i start copy and paste
|
|
|
![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users) |
||
| 0 Members: | ||
Forum Jump |
||
| Lo-Fi Version | Time is now: 25th May 2013 - 03:04 AM |