SlideShare a Scribd company logo
Script
<?php
include_once "koneksi.php";
$ip = $_SERVER['REMOTE_ADDR']; // Getting the user's computer IP
$tanggal = date("Ymd"); // Getting the current date
$waktu = time(); //
// Check your by IPnya, whether the user has had access to today's
$s = mysql_query("SELECT * FROM statistik WHERE ip='$ip' AND tanggal='$tanggal'");
// If not there, save the user data to the database
if(mysql_num_rows($s) == 0){
mysql_query("INSERT INTO statistik(ip, tanggal, hits, online) VALUES('$ip','$tanggal','1','$waktu')");
}
else{
mysql_query("UPDATE statistik SET hits=hits+1, online='$waktu' WHERE ip='$ip' AND
tanggal='$tanggal'");
}
$pengunjung = mysql_num_rows(mysql_query("SELECT * FROM statistik WHERE tanggal='$tanggal'
GROUP BY ip"));
$totalpengunjung = mysql_result(mysql_query("SELECT COUNT(hits) FROM statistik"), 0);
$hits = mysql_fetch_assoc(mysql_query("SELECT SUM(hits) as hitstoday FROM statistik WHERE
tanggal='$tanggal' GROUP BY tanggal"));
$totalhits = mysql_result(mysql_query("SELECT SUM(hits) FROM statistik"), 0);
$tothitsgbr = mysql_result(mysql_query("SELECT COUNT(hits) FROM statistik"), 0);
$bataswaktu = time() - 300;
$pengunjungonline = mysql_num_rows(mysql_query("SELECT * FROM statistik WHERE online >
'$bataswaktu'"));
$path = "counter/";
$ext = ".png";
$tothitsgbr = sprintf("%06d", $tothitsgbr);
for ( $i = 0; $i <= 9; $i++ ){
$tothitsgbr = str_replace($i, "<img src='$path$i$ext' alt='$i'>", $tothitsgbr);
}
echo "<br /><p align=center>$tothitsgbr </p>
<table>
<tr><td class='news-title'><img src=counter/hariini.png> Pengunjung hari ini </td><td class='news-title'>
: $pengunjung </td></tr>
<tr><td class='news-title'><img src=counter/total.png> Total pengunjung </td><td class='news-title'> :
$totalpengunjung </td></tr>
<tr><td class='news-title'><img src=counter/hariini.png> Hits hari ini </td><td class='news-title'> :
$hits[hitstoday] </td></tr>
<tr><td class='news-title'><img src=counter/total.png> Total Hits </td><td class='news-title'> : $totalhits
</td></tr>
<tr><td class='news-title'><img src=counter/online.png> Pengunjung Online </td><td class='news-title'>
: $pengunjungonline </td></tr>
</table>";
?>
Database:
Tabel: Statistik

More Related Content

What's hot

AngularJS $http Interceptors (Explanation and Examples)
AngularJS $http Interceptors (Explanation and Examples)AngularJS $http Interceptors (Explanation and Examples)
AngularJS $http Interceptors (Explanation and Examples)
Brian Swartzfager
 
Flutter Reactive Programming 介紹 - part 1 (Stream)
Flutter Reactive Programming 介紹 - part 1 (Stream)Flutter Reactive Programming 介紹 - part 1 (Stream)
Flutter Reactive Programming 介紹 - part 1 (Stream)
振揚 陳
 
19. CodeIgniter imagini in mysql
19. CodeIgniter imagini in mysql19. CodeIgniter imagini in mysql
19. CodeIgniter imagini in mysql
Razvan Raducanu, PhD
 
Php Mysql
Php Mysql Php Mysql
Php Mysql
Mudasir Syed
 
Threading
ThreadingThreading
Threadingb290572
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !
Matheus Marabesi
 
HeadCouch - CouchDB PHP Client
HeadCouch - CouchDB PHP ClientHeadCouch - CouchDB PHP Client
HeadCouch - CouchDB PHP Client
Dimitar Ivanov
 
MySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of ThingsMySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of Things
Alexander Rubin
 
Gaelyk
GaelykGaelyk
第4回 g* ワークショップ はじめてみよう! Grailsプラグイン
第4回 g* ワークショップ はじめてみよう! Grailsプラグイン第4回 g* ワークショップ はじめてみよう! Grailsプラグイン
第4回 g* ワークショップ はじめてみよう! Grailsプラグイン
Tsuyoshi Yamamoto
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
syeda zoya mehdi
 
与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库
YUCHENG HU
 
PostgreSQL's Secret NoSQL Superpowers
PostgreSQL's Secret NoSQL SuperpowersPostgreSQL's Secret NoSQL Superpowers
PostgreSQL's Secret NoSQL Superpowers
Amanda Gilmore
 
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Bruce McPherson
 
Node.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer NäheNode.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer Nähe
Ralph Winzinger
 
Do something in 5 with gas 4- Get your analytics profiles to a spreadsheet
Do something in 5 with gas 4- Get your analytics profiles to a spreadsheetDo something in 5 with gas 4- Get your analytics profiles to a spreadsheet
Do something in 5 with gas 4- Get your analytics profiles to a spreadsheet
Bruce McPherson
 

What's hot (20)

AngularJS $http Interceptors (Explanation and Examples)
AngularJS $http Interceptors (Explanation and Examples)AngularJS $http Interceptors (Explanation and Examples)
AngularJS $http Interceptors (Explanation and Examples)
 
Flutter Reactive Programming 介紹 - part 1 (Stream)
Flutter Reactive Programming 介紹 - part 1 (Stream)Flutter Reactive Programming 介紹 - part 1 (Stream)
Flutter Reactive Programming 介紹 - part 1 (Stream)
 
19. CodeIgniter imagini in mysql
19. CodeIgniter imagini in mysql19. CodeIgniter imagini in mysql
19. CodeIgniter imagini in mysql
 
Php Mysql
Php Mysql Php Mysql
Php Mysql
 
G* on GAE/J 挑戦編
G* on GAE/J 挑戦編G* on GAE/J 挑戦編
G* on GAE/J 挑戦編
 
Etoy proyecto
Etoy proyectoEtoy proyecto
Etoy proyecto
 
Threading
ThreadingThreading
Threading
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !
 
HeadCouch - CouchDB PHP Client
HeadCouch - CouchDB PHP ClientHeadCouch - CouchDB PHP Client
HeadCouch - CouchDB PHP Client
 
MySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of ThingsMySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of Things
 
Gaelyk
GaelykGaelyk
Gaelyk
 
第4回 g* ワークショップ はじめてみよう! Grailsプラグイン
第4回 g* ワークショップ はじめてみよう! Grailsプラグイン第4回 g* ワークショップ はじめてみよう! Grailsプラグイン
第4回 g* ワークショップ はじめてみよう! Grailsプラグイン
 
Sql inyection
Sql inyectionSql inyection
Sql inyection
 
Mongo db for C# Developers
Mongo db for C# DevelopersMongo db for C# Developers
Mongo db for C# Developers
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
 
与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库与 PHP 和 Perl 使用 MySQL 数据库
与 PHP 和 Perl 使用 MySQL 数据库
 
PostgreSQL's Secret NoSQL Superpowers
PostgreSQL's Secret NoSQL SuperpowersPostgreSQL's Secret NoSQL Superpowers
PostgreSQL's Secret NoSQL Superpowers
 
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
 
Node.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer NäheNode.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer Nähe
 
Do something in 5 with gas 4- Get your analytics profiles to a spreadsheet
Do something in 5 with gas 4- Get your analytics profiles to a spreadsheetDo something in 5 with gas 4- Get your analytics profiles to a spreadsheet
Do something in 5 with gas 4- Get your analytics profiles to a spreadsheet
 

Similar to 25437 pertemuan25(hitcounter)

Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
Rifat Nabi
 
Silex meets SOAP & REST
Silex meets SOAP & RESTSilex meets SOAP & REST
Silex meets SOAP & REST
Hugo Hamon
 
Eden Hackathon Benilde (Mysql & SMTP)
Eden Hackathon Benilde (Mysql & SMTP)Eden Hackathon Benilde (Mysql & SMTP)
Eden Hackathon Benilde (Mysql & SMTP)
Dan Michael Molina
 
Full Stack Web Development.pptx
Full Stack Web Development.pptxFull Stack Web Development.pptx
Full Stack Web Development.pptx
DineshGokuladas
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
Jonathan Wage
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ Etsy
Nishan Subedi
 
The State of Lithium
The State of LithiumThe State of Lithium
The State of Lithium
Nate Abele
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of Lithium
Nate Abele
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
Marcus Ramberg
 
Keeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro FrameworkKeeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro FrameworkJeremy Kendall
 
WordPress as an application framework
WordPress as an application frameworkWordPress as an application framework
WordPress as an application framework
Dustin Filippini
 
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Masahiro Nagano
 
Introduction to Zend Framework web services
Introduction to Zend Framework web servicesIntroduction to Zend Framework web services
Introduction to Zend Framework web services
Michelangelo van Dam
 
Undercover Pods / WP Functions
Undercover Pods / WP FunctionsUndercover Pods / WP Functions
Undercover Pods / WP Functions
podsframework
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015
Fernando Daciuk
 
The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
Hugo Hamon
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony Apps
Kris Wallsmith
 

Similar to 25437 pertemuan25(hitcounter) (20)

Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
Silex meets SOAP & REST
Silex meets SOAP & RESTSilex meets SOAP & REST
Silex meets SOAP & REST
 
Eden Hackathon Benilde (Mysql & SMTP)
Eden Hackathon Benilde (Mysql & SMTP)Eden Hackathon Benilde (Mysql & SMTP)
Eden Hackathon Benilde (Mysql & SMTP)
 
Full Stack Web Development.pptx
Full Stack Web Development.pptxFull Stack Web Development.pptx
Full Stack Web Development.pptx
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ Etsy
 
The State of Lithium
The State of LithiumThe State of Lithium
The State of Lithium
 
Php
PhpPhp
Php
 
Database api
Database apiDatabase api
Database api
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of Lithium
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
 
Keeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro FrameworkKeeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro Framework
 
WordPress as an application framework
WordPress as an application frameworkWordPress as an application framework
WordPress as an application framework
 
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
 
Introduction to Zend Framework web services
Introduction to Zend Framework web servicesIntroduction to Zend Framework web services
Introduction to Zend Framework web services
 
Undercover Pods / WP Functions
Undercover Pods / WP FunctionsUndercover Pods / WP Functions
Undercover Pods / WP Functions
 
Bacbkone js
Bacbkone jsBacbkone js
Bacbkone js
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015
 
The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony Apps
 

More from Universitas Bina Darma Palembang

29510 pertemuan18(form method-get-post-dan-session(1))
29510 pertemuan18(form method-get-post-dan-session(1))29510 pertemuan18(form method-get-post-dan-session(1))
29510 pertemuan18(form method-get-post-dan-session(1))
Universitas Bina Darma Palembang
 
28501 pertemuan14(php)
28501 pertemuan14(php)28501 pertemuan14(php)
28501 pertemuan14(php)
Universitas Bina Darma Palembang
 
28500 pertemuan22(header dokumen html dgn tag title)
28500 pertemuan22(header dokumen html dgn tag title)28500 pertemuan22(header dokumen html dgn tag title)
28500 pertemuan22(header dokumen html dgn tag title)
Universitas Bina Darma Palembang
 
18759 pertemuan20(web html editor)
18759 pertemuan20(web html editor)18759 pertemuan20(web html editor)
18759 pertemuan20(web html editor)
Universitas Bina Darma Palembang
 
18040 pertemuan13(css)
18040 pertemuan13(css)18040 pertemuan13(css)
18040 pertemuan13(css)
Universitas Bina Darma Palembang
 
16406 pertemuan17(konsep basis-data-di-web)
16406 pertemuan17(konsep basis-data-di-web)16406 pertemuan17(konsep basis-data-di-web)
16406 pertemuan17(konsep basis-data-di-web)
Universitas Bina Darma Palembang
 
15294 pertemuan9(eksplorasi &defenisi masalah0
15294 pertemuan9(eksplorasi &defenisi masalah015294 pertemuan9(eksplorasi &defenisi masalah0
15294 pertemuan9(eksplorasi &defenisi masalah0
Universitas Bina Darma Palembang
 
12738 pertemuan 15(php lanjutan)
12738 pertemuan 15(php lanjutan)12738 pertemuan 15(php lanjutan)
12738 pertemuan 15(php lanjutan)
Universitas Bina Darma Palembang
 
6346 pertemuan21(web statis dengan struktur html)
6346 pertemuan21(web statis dengan struktur html)6346 pertemuan21(web statis dengan struktur html)
6346 pertemuan21(web statis dengan struktur html)
Universitas Bina Darma Palembang
 
5623 pertemuan11(html1)
5623 pertemuan11(html1)5623 pertemuan11(html1)
5623 pertemuan11(html1)
Universitas Bina Darma Palembang
 
4740 pertemuan8(komponen dalam web)
4740 pertemuan8(komponen dalam web)4740 pertemuan8(komponen dalam web)
4740 pertemuan8(komponen dalam web)
Universitas Bina Darma Palembang
 
4075 pertemuan10 (analisa kebutuhan)
4075 pertemuan10 (analisa kebutuhan)4075 pertemuan10 (analisa kebutuhan)
4075 pertemuan10 (analisa kebutuhan)
Universitas Bina Darma Palembang
 
2670 pertemuan12(html lanjut)
2670 pertemuan12(html lanjut)2670 pertemuan12(html lanjut)
2670 pertemuan12(html lanjut)
Universitas Bina Darma Palembang
 
2190 pertemuan24(polling)
2190 pertemuan24(polling)2190 pertemuan24(polling)
2190 pertemuan24(polling)
Universitas Bina Darma Palembang
 
999 pertemuan7(prinsip perancangan web)
999 pertemuan7(prinsip perancangan web)999 pertemuan7(prinsip perancangan web)
999 pertemuan7(prinsip perancangan web)
Universitas Bina Darma Palembang
 

More from Universitas Bina Darma Palembang (20)

30448 pertemuan1
30448 pertemuan130448 pertemuan1
30448 pertemuan1
 
29510 pertemuan18(form method-get-post-dan-session(1))
29510 pertemuan18(form method-get-post-dan-session(1))29510 pertemuan18(form method-get-post-dan-session(1))
29510 pertemuan18(form method-get-post-dan-session(1))
 
28501 pertemuan14(php)
28501 pertemuan14(php)28501 pertemuan14(php)
28501 pertemuan14(php)
 
28500 pertemuan22(header dokumen html dgn tag title)
28500 pertemuan22(header dokumen html dgn tag title)28500 pertemuan22(header dokumen html dgn tag title)
28500 pertemuan22(header dokumen html dgn tag title)
 
23921 pertemuan 3
23921 pertemuan 323921 pertemuan 3
23921 pertemuan 3
 
19313 pertemuan6
19313 pertemuan619313 pertemuan6
19313 pertemuan6
 
18759 pertemuan20(web html editor)
18759 pertemuan20(web html editor)18759 pertemuan20(web html editor)
18759 pertemuan20(web html editor)
 
18040 pertemuan13(css)
18040 pertemuan13(css)18040 pertemuan13(css)
18040 pertemuan13(css)
 
17945 pertemuan5
17945 pertemuan517945 pertemuan5
17945 pertemuan5
 
16406 pertemuan17(konsep basis-data-di-web)
16406 pertemuan17(konsep basis-data-di-web)16406 pertemuan17(konsep basis-data-di-web)
16406 pertemuan17(konsep basis-data-di-web)
 
15294 pertemuan9(eksplorasi &defenisi masalah0
15294 pertemuan9(eksplorasi &defenisi masalah015294 pertemuan9(eksplorasi &defenisi masalah0
15294 pertemuan9(eksplorasi &defenisi masalah0
 
13926 pertemuan4
13926 pertemuan413926 pertemuan4
13926 pertemuan4
 
12738 pertemuan 15(php lanjutan)
12738 pertemuan 15(php lanjutan)12738 pertemuan 15(php lanjutan)
12738 pertemuan 15(php lanjutan)
 
6346 pertemuan21(web statis dengan struktur html)
6346 pertemuan21(web statis dengan struktur html)6346 pertemuan21(web statis dengan struktur html)
6346 pertemuan21(web statis dengan struktur html)
 
5623 pertemuan11(html1)
5623 pertemuan11(html1)5623 pertemuan11(html1)
5623 pertemuan11(html1)
 
4740 pertemuan8(komponen dalam web)
4740 pertemuan8(komponen dalam web)4740 pertemuan8(komponen dalam web)
4740 pertemuan8(komponen dalam web)
 
4075 pertemuan10 (analisa kebutuhan)
4075 pertemuan10 (analisa kebutuhan)4075 pertemuan10 (analisa kebutuhan)
4075 pertemuan10 (analisa kebutuhan)
 
2670 pertemuan12(html lanjut)
2670 pertemuan12(html lanjut)2670 pertemuan12(html lanjut)
2670 pertemuan12(html lanjut)
 
2190 pertemuan24(polling)
2190 pertemuan24(polling)2190 pertemuan24(polling)
2190 pertemuan24(polling)
 
999 pertemuan7(prinsip perancangan web)
999 pertemuan7(prinsip perancangan web)999 pertemuan7(prinsip perancangan web)
999 pertemuan7(prinsip perancangan web)
 

Recently uploaded

Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 

Recently uploaded (20)

Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 

25437 pertemuan25(hitcounter)

  • 1. Script <?php include_once "koneksi.php"; $ip = $_SERVER['REMOTE_ADDR']; // Getting the user's computer IP $tanggal = date("Ymd"); // Getting the current date $waktu = time(); // // Check your by IPnya, whether the user has had access to today's $s = mysql_query("SELECT * FROM statistik WHERE ip='$ip' AND tanggal='$tanggal'"); // If not there, save the user data to the database if(mysql_num_rows($s) == 0){ mysql_query("INSERT INTO statistik(ip, tanggal, hits, online) VALUES('$ip','$tanggal','1','$waktu')"); } else{ mysql_query("UPDATE statistik SET hits=hits+1, online='$waktu' WHERE ip='$ip' AND tanggal='$tanggal'"); }
  • 2. $pengunjung = mysql_num_rows(mysql_query("SELECT * FROM statistik WHERE tanggal='$tanggal' GROUP BY ip")); $totalpengunjung = mysql_result(mysql_query("SELECT COUNT(hits) FROM statistik"), 0); $hits = mysql_fetch_assoc(mysql_query("SELECT SUM(hits) as hitstoday FROM statistik WHERE tanggal='$tanggal' GROUP BY tanggal")); $totalhits = mysql_result(mysql_query("SELECT SUM(hits) FROM statistik"), 0); $tothitsgbr = mysql_result(mysql_query("SELECT COUNT(hits) FROM statistik"), 0); $bataswaktu = time() - 300; $pengunjungonline = mysql_num_rows(mysql_query("SELECT * FROM statistik WHERE online > '$bataswaktu'")); $path = "counter/"; $ext = ".png"; $tothitsgbr = sprintf("%06d", $tothitsgbr); for ( $i = 0; $i <= 9; $i++ ){ $tothitsgbr = str_replace($i, "<img src='$path$i$ext' alt='$i'>", $tothitsgbr); } echo "<br /><p align=center>$tothitsgbr </p> <table> <tr><td class='news-title'><img src=counter/hariini.png> Pengunjung hari ini </td><td class='news-title'> : $pengunjung </td></tr> <tr><td class='news-title'><img src=counter/total.png> Total pengunjung </td><td class='news-title'> : $totalpengunjung </td></tr> <tr><td class='news-title'><img src=counter/hariini.png> Hits hari ini </td><td class='news-title'> : $hits[hitstoday] </td></tr> <tr><td class='news-title'><img src=counter/total.png> Total Hits </td><td class='news-title'> : $totalhits </td></tr>
  • 3. <tr><td class='news-title'><img src=counter/online.png> Pengunjung Online </td><td class='news-title'> : $pengunjungonline </td></tr> </table>"; ?> Database: Tabel: Statistik