Joke Collection Website - Blessing messages - How does wordpress add visitor information at the bottom of a web page?

How does wordpress add visitor information at the bottom of a web page?

/**

* Total website visits/Total website visits today/Who is the visitor now?

* @ return[ type] [description]

*/

Function wb_site_count_user(){

$addnum = rand(5, 10); //The number of visitors increased by each visitor is 5- 10.

session_start()。

$date = date('ymd ',time());

If (! isset($_SESSION['wb_ '。 $ date])& amp; & amp! $_SESSION['wb_ '。 $date]){

$ count = get _ option(' site _ count ');

If (! $count ||! is_array($count)){

$newcount = array(

all ' = & gt8377670,

Date' = & gt$date,

Today' = & gt$addnum

);

update_option( 'site_count ',$ new count);

} Otherwise {

$newcount = array(

all ' = & gt($count['all']+$addnum),

Date' = & gt$date,

Today' = & gt($count['date'] == $date)? ($ count[' today ']+$ addnum):$ addnum

);

update_option( 'site_count ',$ new count);

}

$_SESSION['wb_ '。 $ date]= $ new count[' today '];

}

Return;

}

add_action('init ',' WB _ site _ count _ user ');

//Output access statistics

Function wb_echo_site_count(){

session_start()。

$ site count = get _ option(' site _ count ');

$date = date('ymd ',time());

Echo'<p> Total visits:

}

1. Add the above code to the back of the funciton.php function file in the wordpress theme root directory;

2. In the subject footer (footer.php), enter