Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: ChR0NiC on December 16, 2003, 03:31 PM

Title: VB 6.0 Attemping to load a page using Inet
Post by: ChR0NiC on December 16, 2003, 03:31 PM
I am making a program that has to do with a game site called  and I want it to connect to my outwar link when it connects.

So when it starts up....




Dim version1 As String

version1 = Inet1.OpenURL ("http://www.out war.com/page.php?x=1070638")

If InStr(version1, "http://www.out war.com") = 0 Then

MsgBox "Version Check Failed" & Chr(44) & " OutWar Client Will Not Continue", vbInformation, "Error"

Else

version2 = Inet1.OpenURL ("http://www.out war.com/" & (specially generated code)



So when I load up version1 it goes to the first page before it refreshes, but Inet doesn't actually refresh even though the HTML says for it to. So you end up with something like this:


<html>
<body>
<script language="JavaScript">
<!--
if (self != top)
{
   alert('Cannot load page inside of a frame!')
   location.replace("http://www.out war.com");
}
</script>
 
</body>
</html>
<META HTTP-EQUIV="refresh" content="0;URL=page.php?x=1070638&tom=1071581916&tom_ench=a16ae064d34fc679213a12dacd93e4f5&pro=7f4c3c52890c9cb9ceba063a68ec19db&r=&h=25e7ec84cd9a43ff95a7c0393468f582">


So the (specially generated code) would be the stuff right after 0;URL= and before the >. So if anyone knows how I might be able to specify for my program to go to that URL, I would appreciate any help anyone could give me. Thanks Alot. I had to put spaces between outwar because it would not show up on this forum otherwise
Title: Re:VB 6.0 Attemping to load a page using Inet
Post by: Skywing on December 16, 2003, 03:47 PM
This is exactly why using META REFRESH to perform redirections is strongly frowned upon.  Of course the Inet control won't process that - it's handling HTTP, not HTML.  You would need something that parses XHTML to know that some seriously broken site wants to redirect you.
Title: Re:VB 6.0 Attemping to load a page using Inet
Post by: RyanIdium on December 16, 2003, 07:11 PM
you need to use instr()nd mid() to get that data after the page loads.