Hi, Im working on Visual Basic Application. I implicity want to read out some variables or text from an website.
Here my idea:
Im owning an website writen in PHP an HTML. Now I got an "Who is Online" System. The Application should (with assistance of an timer) periodly visit the website and read out the variaable contains the number or online users. Now the Application should notify me in an an baloon tip:
"12 users yre visiting your website"
My first Problem: At the moment, I use an PHP Script, which writes the number of current visitors in the <title>-Tag of an php doc. This is very difficult. Is there one bether possibility
My second Problem: I want to to give the text out like that:
Dim Browser As New WebBrowser
Dim useronline As String
useronline = Browser.DocumentTitle
If useronline <> "0" Then
NotifyIcon1.BalloonTipIcon = ToolTipIcon.Info
NotifyIcon1.BalloonTipTitle = "Micronax Online"
NotifyIcon1.BalloonTipText = "Es sind derzeit " & useronline & " Besucher auf der Website online."
NotifyIcon1.ShowBalloonTip(300)
But the &-Operators doesn't work. It doesn't give out the string with the number of visitors. Why
Micronax

Is there only one possibility the read out variables etc. from an HTML or PHP website?
Manish Agarwal
no the problem is not solved, but I found out, that there is a possibility to work with HTTP tunneling between PHP and VB.net.
Like the solution in EMS Mysql Manager
Can someone help me with an HTTP tunnel
Micronax
lvn
I want to associate the String "Currently are" and the variable useronline and the String "on your Website".
Normaly: "Currently are" & useronline & "on your Website"
But doesn't work.
Micronax
Scott Croisdale
Dim Browser As New WebBrowser
Dim useronline As String
useronline = Browser.DocumentTitle
If useronline <> "0" Then
NotifyIcon1.BalloonTipIcon = ToolTipIcon.Info
NotifyIcon1.BalloonTipTitle = "Micronax Online"
NotifyIcon1.BalloonTipText = "Es sind derzeit " & useronline & " Besucher auf der Website online."
NotifyIcon1.ShowBalloonTip(300)
I used this code. But doesn't work. Why
chanmm
hi,
i don't think php send strange thing to you,
first of all how do you access to this service using IE is this a webservice (i.e xml), webpage, binary data just a string message
best regards
chrisminett
hi,
Is your problem solved
Thank you,
Bhanu.
Thomas-W
Hi Micronax,
I don't know PHP, so I'm not sure what the <title> tag represents. The DocumentTitle property for the WebBrowser control returns the text that you would see in the title bar of Internet Explorer. For example, if I entered the following code:
WebBrowser1.Navigate(
http://www.msnbc.msn.com)MsgBox(WebBrowser1.DocumentTitle)
it would return "Today's News from MSNBC - MSNBC.com". When you run your code, what is the value of "useronline"
Steve Hoag
Visual Basic Express
Mike Zimmerman
That should work - useronline is a String variable, and that is the proper way to concatenate strings.
When you say it doesn't work, what result are you seeing Is it displaying "Currently are on your website" or are you getting some sort of error
Try putting a breakpoint on the line that concatenates the strings and see what the value of useronline is at run time.
Steve Hoag
Visual Basic Express
Alf05
This is strange - it should work, and in fact I can get it to work on both Visual Basic Express and Visual Basic Pro on two different computers. However when I try to run it on Express running on a Terminal Server, the BalloonTip never shows up - I assume this is what you are experiencing.
Perhaps it has something to do with permissions, but I would expect to at least get a warning. To pursue this further, what type of environment are you running under If you try this on a different computer (i.e. publish it and install somewhere else) does it work
Steve Hoag
Visual Basic Express