Support Forums
[Source] Basic WebRequest Login Example + How to get info once logged in - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: [Source] Basic WebRequest Login Example + How to get info once logged in (/showthread.php?tid=23211)

Pages: 1 2


[Source] Basic WebRequest Login Example + How to get info once logged in - iRtehLeet - 11-12-2011

[Image: Oekou.png]

This example source is meant to teach you how to log in to a website, use that login cookie to navigate to another webpage on the site with the same cookie (so that you stay logged in) and grab some info. Can be used in many situations, I used SupportForums as my example login. You can make changes to this source to log in to another website and grab info, it has a lot of uses. This will teach the basic .net user how to use web requests/responses to login+getinfo.

This uses a bit of Regex (to teach you how to loop through and grab text that may change in the source) as well.

Enjoy!



RE: [Source] Basic WebRequest Login Example + How to get info once logged in - ★Cooldude★ - 11-12-2011

This looks really neat, thanks. Smile


RE: [Source] Basic WebRequest Login Example + How to get info once logged in - iRtehLeet - 11-12-2011

(11-12-2011, 01:33 PM)★Cooldude★ Wrote: This looks really neat, thanks. Smile

No problem, hope it can help you and others.


RE: [Source] Basic WebRequest Login Example + How to get info once logged in - TalishHF - 11-16-2011

Pretty cool I downloaded! Thanks a lot!


RE: [Source] Basic WebRequest Login Example + How to get info once logged in - WbDev - 12-01-2011

I don't see any download link... ?!?!?


RE: [Source] Basic WebRequest Login Example + How to get info once logged in - milopeach - 12-01-2011

Thanks for this, although I had to create my own for my current Project - Still works efficiently. Smile

Regex for a Date in the order: "MONTH DD, YYYY"
PHP Code:
Regex.IsMatch(Line"((?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?" _
                            
"|Sep(?:tember)?|Sept|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?))(\s+)((?:(?:[0-2]?\d{1})|(?:[3][01]{1})))(?![\d])(.)(\s+)" _
                            
"((?:(?:[1]{1}\d{1}\d{1}\d{1})|(?:[2]{1}\d{3})))(?![\d])"RegexOptions.IgnoreCase Or RegexOptions.Singleline



RE: [Source] Basic WebRequest Login Example + How to get info once logged in - HostGap - 12-03-2011

Thank you for this. I have bookmarked it for when I get time to learn webrequests lol.


RE: [Source] Basic WebRequest Login Example + How to get info once logged in - johnpppp - 12-22-2011

so wheres the dl link??
cant see it


RE: [Source] Basic WebRequest Login Example + How to get info once logged in - BreShiE - 12-22-2011

Erm, where's the download link? Lol, I think it may have been deleted.


RE: [Source] Basic WebRequest Login Example + How to get info once logged in - Virtuous - 12-23-2011

I am pretty sure you are short a download link here, iRtehLeet.
Just saying.. :3

~ZerO