This is the new home of the egghelp.org 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.

get ext. site information with login?!

Old posts that have not been replied to for several years.
Locked
s
sever
Voice
Posts: 9
Joined: Sat Mar 27, 2004 8:04 pm

get ext. site information with login?!

Post by sever »

Hello all,
I have a Problem but my english is very bad! :cry:

I am currently write a script to get information from the www.esl-europe.de site, but the eggdrop must be logged in to the site...
i dont know how I can login mein eggdrop to the site...

example of my script...

Code: Select all

package req http

set url "http://www.esl-europe.net/de/database/players/search/?gameaccount_type=steamid&gameaccount=0:0:12235&x=37&y=3"

bind pub n "?id" proc_id

proc proc_id {nick host hand chan text} {
global url
set token [http::config -useragent "Mozilla 4.0"]
catch { set token [http::geturl $url] } error
putlog "\002status\002: [http::status $token]"
putlog "\002error\002: [http::error $token]"
if {$error=="couldn't open socket: host is unreachable"} {
 putlog "\002$url\002 is unreachable."
}
set htmldata [http::data $token]
putlog "\002html\002:\n$htmldata"
regexp -nocase {<meta name="(.*?)" content="INDEX,NOFOLLOW">} $htmldata temp info
putlog "\002info:\002 $info"
http::cleanup $token
}
I hope anyone can help me and they are can understandt my Problem!
and the regexp is the metatag, and he give a return, but when I go to the nick he cant find the var!
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you need to use ::http::geturl command with -query option to force POSTing of login form data (email and password); you also need :http::formatQuery to format your data to x-url-encoding type
s
sever
Voice
Posts: 9
Joined: Sat Mar 27, 2004 8:04 pm

Post by sever »

and how can I make, sorry I dont know! :(:(:(
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

I didn't know either, but I went I read http extension doc page

and since you said that's your script, I'd assume you can follow me and get a clue by RTFM
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

Ooh yes that is very handy. Did know you could get webpages but not with POST and x-url-encoding!

/me gets back to coding-pc
Locked