Introduction: we can use a program to display the current data. Note: 1. you must put the following code in a file with the extension. PHP; 2. when running code on your server, your server must support the MYSQL database. The code is as follows: put the following code where you want to display the information .? PhpEDITTHIS $ serverlocalhost; $ db_use
Introduction:
We can use a program to display the current data.
Note: 1. you must put the following code in a file with the extension. PHP; 2. when running code on your server, your server must support the MYSQL database.
The code is as follows:
Put the following code where you want to display the information.
// EDIT THIS
$ Server = "localhost ";
$ Db_user = "database username ";
$ Db_pass = "database password ";
$ Database = "database ";
$ Timeoutseconds = 300;
// STOP EDITING
$ Timestamp = time ();
$ Timeout = $ timestamp-$ timeoutseconds;
Mysql_connect ($ server, $ db_user, $ db_pass );
$ Insert = mysql_db_query ($ database, "insert into useronline VALUES
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.