| View previous topic :: View next topic |
| Author |
Message |
sangeli Master Cheater
Reputation: 0
Joined: 07 Dec 2006 Posts: 406
|
Posted: Thu Jan 24, 2008 7:23 pm Post subject: VB6 Browser Help |
|
|
I am not asking stupid questions like how to make a web browser, I am asking how can do do these 2 things:
1) How can i view the page's source that is being viewed?
2) Is there a way I can find the url to a flash move/game that I am viewing without going to temp files, or viewing source and searching .swf? _________________
| Dark Byte wrote: | | ce can certainly damage hardware let's say you have a robotarm attached to your computer, and the software limits usually block it from ripping out it's own cpu. If you remove that limit and then issue the command to rip out the cpu, sure, say goodbye to your hardware |
|
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Thu Jan 24, 2008 7:34 pm Post subject: |
|
|
1) Use microsoft internet transfer controls (inet thingy)
Place it on your form, and make a textbox or rich textbox, another textbox for the url, with a button. In the button, use this:
| Code: | | Text1.Text = Inet1.OpenURL(Text2.Text) |
Text1 = Source Code
Text2 = URL
That should work
2) Grab all links that end in .swf? o.o _________________
|
|
| Back to top |
|
 |
sangeli Master Cheater
Reputation: 0
Joined: 07 Dec 2006 Posts: 406
|
Posted: Thu Jan 24, 2008 11:13 pm Post subject: |
|
|
yea, you can ctrl+f the source, find the address of the .swf, and download it like that. easier than opeining temp internet, all that crap _________________
| Dark Byte wrote: | | ce can certainly damage hardware let's say you have a robotarm attached to your computer, and the software limits usually block it from ripping out it's own cpu. If you remove that limit and then issue the command to rip out the cpu, sure, say goodbye to your hardware |
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Fri Jan 25, 2008 8:34 am Post subject: |
|
|
why do u use inet? I never use inet. I net are for newbs. _________________
Intel over amd yes. |
|
| Back to top |
|
 |
Trow Grandmaster Cheater
Reputation: 2
Joined: 17 Aug 2006 Posts: 957
|
Posted: Fri Jan 25, 2008 8:52 am Post subject: |
|
|
| Blader wrote: | 1) Use microsoft internet transfer controls (inet thingy)
Place it on your form, and make a textbox or rich textbox, another textbox for the url, with a button. In the button, use this:
| Code: | | Text1.Text = Inet1.OpenURL(Text2.Text) |
Text1 = Source Code
Text2 = URL
That should work
2) Grab all links that end in .swf? o.o |
Please don't suggest that.
Source: Me.BrwwebBrowser.Document.body.innerHTML where "BrwwebBrowser" is the browser, obviously
and for swf movies they always have an attribute called "Movie". so you get it with getAttribute("Movie") using HTMLDocument. _________________
Get kidnapped often. |
|
| Back to top |
|
 |
AtheistCrusader Grandmaster Cheater
Reputation: 6
Joined: 23 Sep 2006 Posts: 681
|
Posted: Fri Jan 25, 2008 9:44 am Post subject: |
|
|
| Naablet wrote: | | why do u use inet? I never use inet. I net are for newbs. |
You got another easier way to get page source? |
|
| Back to top |
|
 |
XxOsirisxX Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Oct 2006 Posts: 1597
|
Posted: Fri Jan 25, 2008 10:37 am Post subject: |
|
|
| blland wrote: | | Blader wrote: | 1) Use microsoft internet transfer controls (inet thingy)
Place it on your form, and make a textbox or rich textbox, another textbox for the url, with a button. In the button, use this:
| Code: | | Text1.Text = Inet1.OpenURL(Text2.Text) |
Text1 = Source Code
Text2 = URL
That should work
2) Grab all links that end in .swf? o.o |
Please don't suggest that.
Source: Me.BrwwebBrowser.Document.body.innerHTML where "BrwwebBrowser" is the browser, obviously
and for swf movies they always have an attribute called "Movie". so you get it with getAttribute("Movie") using HTMLDocument. |
Nice that one..
btw, the reason because the blader code is not "appropiated" is because the page is not loaded when is directed linked??
Because i did test boths codes, but boths gave me differents results
btw, your's need the page loaded to do something, but Bader dose'nt
So, the difference is the loaded code have actual stuffs, and direct link code not at all? _________________
|
|
| Back to top |
|
 |
TheIndianGuy Advanced Cheater
Reputation: 102
Joined: 14 Jan 2007 Posts: 88
|
Posted: Fri Jan 25, 2008 4:50 pm Post subject: |
|
|
| masterkert3 wrote: | | Naablet wrote: | | why do u use inet? I never use inet. I net are for newbs. |
You got another easier way to get page source? |
with a messagebox you can say
| Code: | | messagebox.show(webbrowser1.documenttext) |
you can also add a new form to the project and use a textbox (multilined) or richtextbox.
| Code: | | richtextbox1.text = form1.webbrowser1.documenttext |
very simple. i'm not 100% sure if this will work in vb6, but this is how its done in .net |
|
| Back to top |
|
 |
AtheistCrusader Grandmaster Cheater
Reputation: 6
Joined: 23 Sep 2006 Posts: 681
|
Posted: Fri Jan 25, 2008 5:20 pm Post subject: |
|
|
| The code is for .net |
|
| Back to top |
|
 |
sangeli Master Cheater
Reputation: 0
Joined: 07 Dec 2006 Posts: 406
|
Posted: Fri Jan 25, 2008 5:59 pm Post subject: |
|
|
ok. can somone please tell me the code. There are a bunch of people saying different things, and I just want to know how to view the current page's source in a textbox.
I am planning on making a timer every 10 seconds, it gets page source. _________________
| Dark Byte wrote: | | ce can certainly damage hardware let's say you have a robotarm attached to your computer, and the software limits usually block it from ripping out it's own cpu. If you remove that limit and then issue the command to rip out the cpu, sure, say goodbye to your hardware |
|
|
| Back to top |
|
 |
TheIndianGuy Advanced Cheater
Reputation: 102
Joined: 14 Jan 2007 Posts: 88
|
Posted: Fri Jan 25, 2008 7:55 pm Post subject: |
|
|
| masterkert3 wrote: | | The code is for .net |
| skate4lifee wrote: | | i'm not 100% sure if this will work in vb6, but this is how its done in .net |
please read more carefully next time or try a better excuse to raise your post count. |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Jan 27, 2008 9:17 am Post subject: |
|
|
Taken from:
http://pscode.com/vb/scripts/ShowCode.asp?txtCodeId=1030&lngWId=10&txtForceRefresh=12720089582118049
| Code: | private string getSource(string URL)
{
//Set URL
WebResponse objResponse;
WebRequest objRequest;
objRequest = HttpWebRequest.Create(URL);
objResponse = objRequest.GetResponse();
//Grab data from URL
System.IO.StreamReader sr = new System.IO.StreamReader(objResponse.GetResponseStream());
//return the source
return sr.ReadToEnd();
} |
_________________
- Retired. |
|
| Back to top |
|
 |
|