Hello,
I am trying to make a program where the users of my site can buy shares of different companies through VB6.
I wrote a program in PHP that will be viewed through the Web Browser in VB 6 (the web browser that comes in the wizard).
Here's my problem:
The stock url is:
http://api.cgeagles.com/cgsx/stock.php?symbol=<stock symbol here>
I need to open a new window with this url in it:
http://api.cgeagles.com/cgsx/buy.php?symbol=<stock symbol here>
The code to open a new browser window is:
VB Code:
Dim frmB As New frmBrowser frmB.StartingAddress = "http://api.cgeagles.com/cgsx/buy.php" frmB.Show
First I need a way to check if the page is:
http://api.cgeagles.com/cgsx/stock.p...ue&symbol=XXXX
Second, I need to seperate the XXXX from the URL and add it to the new browser window opening code
Here's what I've tried:
VB Code:
On Error Resume Next Me.Caption = brwWebBrowser.LocationName Dim s As Long Dim ss As Long Dim sss As Long s = brwWebBrowser.LocationURL sss = Mid(s, 56, 60) ss = Mid(s, 0, 55) If ss = "http://api.cgeagles.com/cgsx/stock.php?buy=true&symbol=" Then Dim frmB As New frmBrowser frmB.StartingAddress = "http://api.cgeagles.com/cgsx/buy.php?symbol=" + sss frmB.Show End If
But, when I run it, it just opens up thousands of windows pointing to buy.php?symbol=
(it still lacks a symbol)
Can someone tell me what I'm doing wrong??
Thanks,
- k3p7 :confused:
