This is the new home of the community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.

For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

website, login, parse html, output results...

Old posts that have not been replied to for several years.
Posts: 6
Joined: Sat Oct 22, 2005 5:16 am

website, login, parse html, output results...

Post by TheRudy »


First, i'm a complete noob to TCL scripting altho i know some programming languages.

What i want to do:
- Login to a website
- Parse out of URL SID (php) id
- attach this url SID id to another page that is protected (no SID in url = redirects back to login site)
- parses out this html code:

Code: Select all

<font color="87CEEB">*</font></th>
<th><a href="ainfo.php?session=3c546726f1fb&allytag=GP"><font color='lime'>GP</font></a></th>
Things that needs to parsed out are in bold:
<font color='lime'>GP</font>

- next to output this into channel when someones says for example !stats

Now, i DO NOT want YOU to write me this script! I want to write it myself but i need some start up points. What do i need to this, where can i see some examples and so on...
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

how is login done? via HTTP post?
how will the SID beeing returned? cookie? redirect? or will only be visible in URLs contained in the html codes?
generally there are 2 usual ways to parse HTML code
either via tDOM:
or via RE:
examples for REs are found in almost all common scripts accessing html pages. The google script I rewrote also shows an example for the redirect header parsing.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...