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

How to make the website update automatically every day

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

What this article shares with you is about how to make the website update automatically every day. The editor thinks it is very practical, so I hope you can get something after reading this article. Let's take a look at it with the editor.

I believe that many webmaster friends who have just done the website have such feelings that it is really too tiring to update the website every day. If you want to improve the weight of your website, you have to update the website every day, and you can't update the articles for several days at once, because in the view of the search engine, this is still released on the same day, and it doesn't have any effect on the weight of the website. is there any way to update the website automatically?

We all know the importance of frequent updates for the website, search engines like fresh content, if your site is not updated for a long time, the ranking will drop, and if heavy, it will be k. All right, let's cut down the gossip. Here's how to update the website automatically.

First, the old station

The old station here not only refers to the website that has been built for a long time, such a station not only has a certain weight, but also has a certain amount of traffic. The automatic update of this kind of station allows users to create content to achieve automatic update, such as forums, guestbooks and so on. So what to do with most new stations?

Second, the new station

The new stations here are usually soon online, with no weight and no traffic. Here is a way of thinking. Take (http://www.xg51.net)) as an example, look at the following picture:

The automatic update method is to add a visitor information to the website, including the user's access time (including spiders of any search engine), IP address, operating system, browser information and so on. This information is not repeated. As long as users visit the site, this information will be updated automatically, which realizes the rolling update of the website. In this way, many new stations

Have improved their weight and ranking in a short period of time.

The code for obtaining visitor information (ASP version) is now posted:

1, the following code writes guest information to the database.

Dim lailuUrl

If Request.ServerVariables ("Http_Referer") "" then "

LailuUrl=Request.ServerVariables ("Http_Referer")

Else

LailuUrl= "enter directly from the address bar"

End if

Getip=Request.ServerVariables ("REMOTE_ADDR")

Set rsonline = server.CreateObject ("adodb.recordset")

Sql= "select * from [online] where ip='" & Getip& ""

Rsonline.Open sql,Conn,1,3

If rsonline.eof then

Rsonline.addnew

Rsonline ("browser") = Request.ServerVariables ("HTTP_USER_AGENT")

Rsonline ("ip") = Getip

Rsonline ("startTime") = now ()

Rsonline ("lailu") = lailuUrl

Rsonline ("dates") = Date ()

Rsonline.update

Rsonline.close

End if

Function usersysinfo (info,getinfo)

If instr (info, ";") > 0 then

Dim usersys

Usersys=split (info, ";")

If ubound (usersys) > = 2 then

Usersys (1) = replace (usersys (1), "MSIE", "Internet Explorer")

Usersys (2) = replace (usersys (2), ")

Usersys (2) = replace (usersys (2), "NT 5.2", "2003")

Usersys (2) = replace (usersys (2), "NT 5.1", "XP")

Usersys (2) = replace (usersys (2), "NT 5.0"," 2000 ")

Usersys (2) = replace (usersys (2), "NT 6.1"," 7 ")

Usersys (2) = replace (usersys (2), "9x", "Me")

Usersys (1) = Trim (usersys (1))

Usersys (2) = Trim (usersys (2))

If getinfo=1 then

Usersysinfo=usersys (1)

Else

Usersysinfo=usersys (2)

End if

Else

If getinfo=1 then

Usersysinfo= "unknown"

Else

Usersysinfo= "unknown"

End if

End if

Else

If getinfo=1 then

Usersysinfo= "unknown"

Else

Usersysinfo= "unknown"

End if

End if

End function

2, read out the information and add it to the web page

Guest Information:

Code description: create a new table named online and create the following fields:

Browser field: used to record guest client information, such as browser, operating system, etc.

Ip field: record the ip address of the user.

StartTime field: record the time of access.

Lailu field: record where you came from, that is, which URL you came from.

In addition, the function usersysinfo is used to read browser field information.

The above is how to make the website update automatically every day. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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

Network Security

Wechat

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

12
Report