When maintaining the website these days, you have to add a lot of news or other articles. Because you often look for articles on a website, you wonder if you can create a program and specify a URL to let the ASP search for all the articles on this URL, and then analyze the searched articles and save the content of the articles in the database. This will save a lot of trouble?
Later I learned that this idea had been thought about, and some had been a news thief. Haha, but it is said to be from PHP, I have never seen it. Haha, anyway, I started working with a development mentality...
I remember an article I collected before that introduced how to use ASP to get other people's web pages. I took them out and saw it. Hi, there were only a few codes:
URL=http://news.sina.com.cn/
SetobjInet=Server.CreateObject("InetCtls.Inet")
objInet.RequestTimeOut=20
objInet.Url=URL
StrGet=objInet.OpenURL()
Response.WriteStrGet
Isn't this simple? Save it as an asp file to debug, but when debugging, it prompts that CreatObject failed and the category is not authorized to use. I was dizzy. This is the first time I have seen this error. Sometimes FSO cannot be created because the server has cancelled the FSO component, but this does not work. When I searched online, many people said that this ActiveX control is built by IIS. I was dizzy. Is there a problem with my IIS? I copied the program to the server system to debug, or reported the same error. I was dizzy. I don't know which file this component corresponds to.
Today I asked the expert this question in our group, saying that the corresponding file should be MSINET.OCX. I found this file in c:/winnt/system32. Register it, OK, the registration is successful, and the program is debugged again. I was dizzy, or I still reported an error. Could it be that this file on my computer cannot be used? I was dizzy, I downloaded one from the Internet, and re-registered, but I still failed. I was cold~
Continue looking online, hey, I suddenly found that someone had a problem, but what he said was not the same control as me, his original text is as follows:
About VB calling MSWinsock control
Windows scripts can call MSWinssock controls to obtain relatively powerful network access capabilities, but the 106KB mswinsck.ocx (V6.0.89.88) is not included in the system, which greatly reduces the practicality of the control. Moreover, a difficulty must be overcome for the script to call MSWinsock.
Using "MSWinsock" as the keyword, using Baidu to search web pages, you can get at least 3 examples of VBS calling MSWinsock controls: obtain the native IP, port scanning and send "VBS+MSWinsock to create a smart UDP backdoor" in "black defense". However, when you download and register mswinsck.ocx and try those codes, you get a "Classisnotlicensedforuse" error with error number 0x80040112. The authors of those codes seem to think that MSWinsock is the same as ordinary controls, and can be used normally as long as they are registered with regsvr32, and their portability is not actually tested. Those who repost the article will not care whether the content is OK and just copy and paste it. As a result, all the examples of VBS calling MSWinsock on the Internet are "castles in the air", and none of them can run. This is true at home and abroad. All doubts about the inability to use this control were sent off on the grounds that "requires registration". Of course, there are also people who know the "truth", but the solution they gave was to rewrite ocx encapsulation MSWinssock in VB, which is really @#$%^&!.