Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: MichaeL on June 07, 2004, 02:46 PM

Title: Inet Control
Post by: MichaeL on June 07, 2004, 02:46 PM
Hey,

   This is what I need to do.  It will probably sound simple, but it's not working for me. I need to use an Inet Control, and have it go to a specified link, without opening explorer.  For example, if I wanted it to go to www.google.com, I have been using the code:

Form1.Inet1.OpenURL "http://www.google.com"

It did this on a different site, and opened the exe about 5 times, and the Hit Counter on the site remained the same? Any help? A code would be greatly appreciated. Thank you,


MichaeL
Title: Re:Inet Control
Post by: Spht on June 07, 2004, 03:28 PM
Quote from: MichaeL on June 07, 2004, 02:46 PM
Hey,

   This is what I need to do.  It will probably sound simple, but it's not working for me. I need to use an Inet Control, and have it go to a specified link, without opening explorer.  For example, if I wanted it to go to www.google.com, I have been using the code:

Form1.Inet1.OpenURL "http://www.google.com"

It did this on a different site, and opened the exe about 5 times, and the Hit Counter on the site remained the same? Any help? A code would be greatly appreciated. Thank you,


MichaeL

You ran that code and it opened a different site and ran a program 5 times, but yet the page didn't detect your visit?  What?  How do you know the Inet instance visited that other site and not the one you meant to go to (google.com)?
Title: Re:Inet Control
Post by: MichaeL on June 07, 2004, 06:05 PM
Sorry, if I confused you, i used the site: www.gamergang.com.  No hits came up, I still need a code. :/
Title: Re:Inet Control
Post by: The-FooL on June 07, 2004, 07:12 PM
Hes looking to make a program that will increaes the hits to his site.
Title: Re:Inet Control
Post by: Adron on June 07, 2004, 08:43 PM
Perhaps the hit counter only counts IE visits? Perhaps the hit counter counts loads of some particular image or subframe on that page? Perhaps the hit counter is based on vbscript or javascript or cookies being set or something else that isn't just "loading the page"?

A web browser does many things other than just downloading a page...
Title: Re:Inet Control
Post by: Stealth on June 07, 2004, 09:50 PM
Perhaps the counter tracks unique hits? (E107 may be advanced enough for that)
Title: Re:Inet Control
Post by: MichaeL on June 08, 2004, 01:55 PM
I was talking to a friend about this.  He said that Inet only goes to a site to get data, or see if the site exists, so for example, it wont click on a link, is that true?
Title: Re:Inet Control
Post by: Stealth on June 08, 2004, 03:55 PM
It downloads the contents of the website, which would trick a simple enough counter into believing it was a pageview.
Title: Re:Inet Control
Post by: Lycaon on June 08, 2004, 04:27 PM
Easiest solution:  Put this in a module:


Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

Public Function OpenURL(sURL As String) As Boolean

OpenURL = URLDownloadToFile(0, sURL, "C:\Windows\Temp\whatever.html", 0, 0) = 0)

End Sub


Returns True if the page was downloaded, False if it wasn't.

Quick and dirty, but not friendly.  If you want a more powerful class that'll do the same but with more control, let me know.
Title: Re:Inet Control
Post by: hismajesty on June 08, 2004, 04:33 PM
Quote from: Stealth on June 07, 2004, 09:50 PM
Perhaps the counter tracks unique hits? (E107 may be advanced enough for that)

His site displays all hits, with a seperate area for unique.
Title: Re:Inet Control
Post by: Scope on June 29, 2004, 09:25 PM
I added a Navigate module into my bot to easily open IE / Netscape / MSN / AOL browsers. Whatever was available at the time. If you add one of those your code could be as simple as:

Navigate "http://www.url.com"
Title: Re:Inet Control
Post by: muert0 on June 29, 2004, 10:16 PM
Which if his site reads unique hits it still won't count. Or is that wrong?