Use ActiveX Control inetctls. Inet to implement news thief in ASP

Source: Internet
Author: User

During website maintenance over the past few days, a lot of news or other Article Because I often find articles on a website, I wonder if I can Program , Specify a URL for ASP to search for all the articles on the URL, analyze the searched articles, and save the articles to the database, can this save a lot of trouble?

Later, I learned that some people thought about this idea and have worked as news thieves. But it is said that it is Php, and I have never seen it, I am reporting a development mentality to start my work ......

I remember a previous article about how to use ASP to retrieve others' webpages.Code:

Url = http://news.sina.com.cn/
Set objinet = server. Createobject ("inetctls. Inet ")
Objinet. requesttimeout = 20
Objinet. url = URL
Strget = objinet. Openurl ()
Response. Write strget

This is not simple. Saved as an ASP file for debugging, but when debugging, the system prompts that the creatobject failed and the category is not authorized for use. I am dizzy. This error is the first time I have seen it, sometimes FSO cannot be created because the server has logged out of the FSO component, but this is not possible. When I searched the internet, many people said that this ActiveX control was provided by IIS, And I was dizzy, is there a problem with my IIS? I am dizzy when I copy the program to the server system for debugging and still report the same error. I don't know which file this component corresponds ~

Today, I asked the experts in our group this question, saying that the corresponding file should be msinet. OCX, C:/winnt/system32 found this file, register it, OK, register successfully, debug the program again, I am dizzy, or report an error. Is this file on my computer unusable? I was dizzy. I downloaded one from the Internet and registered it again. I am cold ~

I went on to look for it online. Ah, I suddenly found someone had a problem, but what I said was not a control. His original article was like this:

About VB calling mswinsock Control
Windows scripts can call the mswinsock control to obtain powerful network access capabilities. However, the mswinsck. ocx (v6.0.89.88) of the 106kb is not provided by the system, which greatly compromises the practicability of the control. In addition, to call mswinsock by a script, you must overcome the difficulties.

Using the keyword "mswinsock" and Baidu to search for a webpage, you can obtain at least three examples of vbs calling the mswinsock control: obtain the IP address, port scan, and create a smart UDP backdoor in vbs + mswinsock of anti-DDoS pro. However, when you download and register mswinsck. OCX. When you try the code, you will get an "class is not licensed for use" error with the error code 0x80040112. The authors of those codes seem to think that mswinsock is the same as a general control. As long as regsvr32 is used for registration, it can be used normally without testing its portability. The person who posts the article will not care about whether the content is okay *, but simply copy and paste the content. As a result, all examples of vbs calling mswinsock on the Internet are "castle in the air", and none of them are running. The same is true in China and abroad. All questions about the unavailability of the control were rejected for the reason "registration required. Of course, there are people who know the "truth", but the solution they provided was to re-write an OCX encapsulation mswinsock using VB. This is actually @ #$ % ^ &!.

So what is "truth? It is a good idea to search for "category unauthorized use" and error numbers, but the results are not satisfactory. We need to reverse think about why the original author will not encounter errors. The answer is that mswinsck. ocx of the original author is not registered separately, but installed with VB. The difference is that the latter installs the design-time license for the VB Control ). ActiveX controls have two types of license: Design-time and run-time ). When the compiler calls the EXE/dll/OCX of a control, the compiler automatically adds the runtime license to the control. Therefore, it is feasible to "re-write an OCX encapsulation mswinsock. When you use a script to directly call mswinsock without a runtime license, the Script Host will try to obtain the design license in the registry. The separately registered mswinsock does not have a design-time license, so an error occurs.

On the Vs. net installation disk, you have the VB6 control Authorization key (\ extras \ VB6 controls \ vb6controls. Reg). After importing the registry, you can use the VB6 control, including mswinsock.

I wonder if this control is not usable because of this problem? Fortunately, the author shared the Registry file and quickly downloaded it. Check that there is an Internet Transfer Control 6.0 license key. Isn't this ITC exactly what I want? Import it to the Registry. I am dizzy when I debug the program again ~

However, the cause of this failure is that the computer has not been restarted. By the way, you may also need to upload the Registry file provided by the original author ~

Now I can make a good job of my article thieves ~

20051111183658185. rar
Http://www.ie999.net/g1ames/dll/Mswinsck.zip

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.