DO NOT DEAL WITH THIS MEMBER
Let's say i want to go to the page
http://extalia.net/index.php
And get the amount of players online, the number. And print it out into my vb.net form. So something like,
Dim Derp As String = web address
Dim Derp2 As String = Replace("Online", "")
Label1.text = Derp2
Of coarse in the above I need to somehow read the php and search for the line with the specific string "online" and print out the entire string
Any advice?
if u just have text in the index then all u need is to use webclient downloadstring with the url which return the text
DO NOT DEAL WITH THIS MEMBER
(Jul 27, 2015 08:04 AM)Only3 Wrote: if u just have text in the index then all u need is to use webclient downloadstring with the url which return the text
Can you explain a bit more for me.
Label1.text = New Net.WebClient().DownloadString("http://extalia.net/index.php")
DO NOT DEAL WITH THIS MEMBER
Jul 27, 2015 08:41 AM
(This post was last modified: Jul 27, 2015 08:44 AM by log dot zip.)
EDIT: Don't actually name your MyBase.Load handler "Load", it's bad naming and I only did it because I was too lazy to click the form.
(Jul 27, 2015 08:41 AM)log dot zip Wrote: ![[Image: FzuqHzX.png]](https://i.imgur.com/FzuqHzX.png)
EDIT: Don't actually name your MyBase.Load handler "Load", it's bad naming and I only did it because I was too lazy to click the form.
I was about to point our your naming of the FormLoad event, then saw the edit at the bottom.
DO NOT DEAL WITH THIS MEMBER
(Jul 27, 2015 08:41 AM)log dot zip Wrote: -snip
What do you think of this pattern instead?
DO NOT DEAL WITH THIS MEMBER
Jul 27, 2015 10:05 AM
(This post was last modified: Jul 27, 2015 10:21 AM by log dot zip.)
(Jul 27, 2015 10:01 AM)Odus Wrote: What do you think of this pattern instead?
I mean, they match the exact same things, just in different ways. :P
edit: Odus's does not use | (or), which in my eyes makes it cleaner (still matches the exact same things however), replace the regex with that instead.
(Jul 27, 2015 10:01 AM)Odus Wrote: What do you think of this pattern instead?
@Odus
@CodeConfusion
What if the website had "3,86,600 ONLINE" ? What you then gon do big bois?
DO NOT DEAL WITH THIS MEMBER
(Jul 27, 2015 10:16 AM)+Haze Wrote: @Odus
@CodeConfusion
What if the website had "3,86,600 ONLINE" ? What you then gon do big bois?
Congratulate them on the unrealistic numbers they've been getting recently.
LOOOOOOL, you never know though, one day they could be hitting a milli views. Anway
Code ((\d+\,)+\d+) ONLINE
DO NOT DEAL WITH THIS MEMBER
(Jul 27, 2015 10:16 AM)+Haze Wrote: @Odus
@CodeConfusion
What if the website had "3,86,600 ONLINE" ? What you then gon do big bois?
Since we're both nitpicking: not possible as 36,86,600 is not a real number.
Lets be realistic though, the site will likely not breach 999,999 online users at any given time. If it does, then you can account for it with your pattern, but even still... 2 capture groups?
Yeah nitpicking ftw. And tru tru tru, I could use a char class.
Code ([\d+\,]+\d+) ONLINE
But yeah I doubt the site would reach 1 mill views lol
|