We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,324 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Using a site data

hi,
i want to connect to a site and use data in it, like a program that connects to www.imdb.com, search for a movie and returns information, i want to do that with www.cheatserver.com, or www.cheathappens.com

i want to write a game name in a textbox, and when i press the "search" button, the program looks in site and return me cheats of that game...

can anyone help me plz??

3
Contributors
10
Replies
3 Days
Discussion Span
2 Years Ago
Last Updated
11
Views
AienTech
Newbie Poster
7 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

First you will need to view the source code for the specific web site and get their searchbox name and the submit button name from the source code.

Add a webbrowser to your form.

In code the following -

WebBrowser1.Navigate2 "http://www.MySiteToSearch.com/"

WebBrowser1.Document.All("TheSearchedSitesTextboxName").Value = MySearchTextboxName

WebBrowser1.Document.All("TheSearchedSitesSubmitButtonName").Click

Does this help?

AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

now my problem is finding the source code of site!! how can i do that?
i dont know web programing

AienTech
Newbie Poster
7 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

and 1more thing, how can i show my search result in a listview?

AienTech
Newbie Poster
7 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Open the site you want to search, right click and select "View Source" or "View Source Code". This will bring up a html page with the source code. Search through the code for the textbox name, will normally be txtSearch or something similar.

After the search, make your browser visible, all the searched criteria will be there. You can add this to the listbox by manipulating the source code again. After search, view the source code and capture the names to be displayed. Add these to your listbox.

AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

there is no "Click" and "Value" method in webbrowser object, im using VB.Net 2008

AienTech
Newbie Poster
7 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

My apologies, just made the switch to .net, still thinking vb6 -

WebBrowser1.Document.GetElementById("MySearchedTextboxName").SetAttribute("Value", Information.txtuser.Text)

If you want to read the returned data -

Dim myElement as HtmlElement
myElement = Webbrowser1.document.GetElementById("The name of the element here")
Dim Value as String = myElement.GetAttribute("value")
MessageBox.Show("Here is the value: " & Value)

Simulate the click event of the submit button -

WebBrowser1.Document.Forms("form1").InvokeMember("submit")
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

okay, i did, but it doesn't give me any answers

i putted my project in this link (http://www.4shared.com/file/K8959wQP/NNN.html)
i just made the GUI, maybe you can help me through that, im really new to this kind of projects....

and tnx for helping :)

AienTech
Newbie Poster
7 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

I'll look over it during the weekend sometime.

AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

ok, no problem, tnx

AienTech
Newbie Poster
7 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

You can fetch webpage in C#. Make a class and call in your vb.net project

WebRequest request = WebRequest.Create("http://wep page address");
WebResponse response = request.GetResponse();
System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream());
string plainText = reader.ReadToEnd();

silwar
Newbie Poster
1 post since Sep 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.1008 seconds using 2.69MB