Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of getting browsing History by Imperial CMS

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article is about how Imperial CMS obtains browsing history. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

How does Imperial CMS get browsing history?

The method steps are as follows:

First, add the following code to e/class/userfun.php:

The code is as follows:

Function user_SetCook ($name,$id,$time=0,$num=10) {/ / cookie name ID timestamp quantity if (! $id) {printerror2 ('nonexistent product record', $_ SERVER ['HTTP_REFERER']);} $prodq=$id.' |'; $projilu=getcvar ($name); if ($projilu) {$prozuhe=$prodq.$projilu;// put newly browsed on the first $pro_arr=explode ('|', $prozuhe); $new_arr=array_merge (array_unique ($pro_arr)) / / remove duplicates and re-index subscript foreach ($new_arr as $key= > $val) {if (($keyquery ("select id,title,titlepic,titleurl from {$dbtbpre} ecms_ {$tbname} where idin ({$jilu_idin}) order by find_in_set (id,' {$jilu_idin}') limit {$num}"); / / sort while ($jilu_r=$empire- > fetch ($sql)) {$titleurl=sys_ReturnBqTitleLink ($jilu_r) in idin; echo'. $jilu_ r [title]. / / here, to modify the style, you need to add your own picture}}

Second, add the following code to the top of the content template:

The code is as follows:

Three: add the following code where it needs to be displayed:

The code is as follows:

Where:

Cookiepro is the name

Shop is the name of the data table

10 is the number of calls

Thank you for reading! This is the end of the way for Imperial CMS to obtain browsing records. I hope the above content can be of some help to you so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report