Making a Myspace Friend adder

Status
Not open for further replies.

skaryChinezeGuie

Well-known member
Joined
Apr 23, 2006
Messages
94
Programming Experience
Beginner
I was thinking of making a myspace friend adder. Can I just add a web browser component to my web form, or do I need to make an ASP application?:D
 
You should just add a web browser component to your form.

An ASP application runs on a webserver and provides a website service to the user. i.e. MySpace could very well be a ASP.NET application. If youre writing a program to be a client of something else, you shouldnt use ASP - it's for server apps and you generally have to access an ASP application via a web browser. The potential advantages of writing any app in ASP is that, once hosted on a webserver, it can be accessed anywhere in the world, with a web browser; software all PCs have. There is nothing left to install..

You need to be really clear on the difference between a client app and a server app though. If I havent explained the difference very clearly, let me know.
 
cool. but it's just a blank box. is there something else i need to do for it to work?
 
FYI, there was legal action (just a cease and desist that I know of) of someone that made some type of integration to MySpace such as a notification system of a profile changing. MySpace wasn't too happy about this integration of their services without their consent. So be careful!!!
 
this isn't actually an integration. It's a stand-alone prog that automaticlly goes to the add page of a profile and clicks a button. I don't think that's gonna be a problem but thanks for the heads up. I'm not sure if we're thinking of the same thing but the person that screwed with myspace actually wrote a javascript and used HTML embed tags to call the script since myspace doesn't allow java. As a result he obtained over 1,000,000 friends in a few hours. now myspace has made it so that no one can add more than 200 friends a day or send over a certain amount of messages. there are programs that claim to get around this so maybe that's why myspace was pissed.
 
To get the web browser, you add a reference to shdocvw.dll (Web Browser Control)

Once you have the control on your form, you need to tell it what to do..

Take a look at the Navigate and Navigate2 methods.
When the browser is finished navigating, the DocumentComplete event is fired. Only at this time is the .Document property of the web browser control fully interrogable for the contents of the HTML document. Installing Firefox may help with your understanding of the .Document property as Firefox has a DOM Browser option that allows you to see a webpage in terms of how it is structured to fit into the Document Object Model.
Typically in IE, HTML is used to build a DOM, then the DOM is rendered. This will explain any differences you may find in a HTML raw data you provide/navigate to and the contents of the Document.Body.OuterHTML property

Once you are conversant with the DOM and .Document, you will be able to programmatically interact witha website as if you were sitting at it, clicking. For example, you can find a form object on the site, fill it with values and .Submit() it. You should consult the MSDN documentation for more information. A good google serach term is "DHTML Reference" for things related to HTML structure. THose pages also have links to DOM behaviour, but other tutorials may provide an easier start. Take a look.
 
Along with the ActiveX webbrowser you want to add reference to Microsoft HTML Object Library (mshtml) for use with manipulating the Document Object Model (DOM) document. If you step up to .Net 2.0 there is a WebBrowser control integrated in framework that also includes the DOM stuff, but the knowledge and usage to interact DHTML is the same. There is quite a lot of information on the web on this topic once you know what to search, also some on these forums. (Other Controls forum related to webbrowser control http://www.vbdotnetforums.com/forumdisplay.php?f=77 for instance)
 
ok i understand all that and that would've been one of my questions but i'm still at the beginning. I've gone to the control box, added the microsoft web browser COM component, added it to my form, and i was told to set the navigate property, but i don't see one.
 
No, there is no navigate property, it is a method, the method you use from code to make the browser navigate to a website .
 
i'm back. Ok now i've got the page to load, what would be the easiest way to extract and make a list of all the friend ID's on a page? I can find them manually by looking at the source code for the page, but how would i ectract and make a list of all of them?
 
Status
Not open for further replies.
Back
Top