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.

how to logon to a site with logon name and password?

Old posts that have not been replied to for several years.
Locked
S
SnOoPDoGg187
Voice
Posts: 17
Joined: Fri Apr 04, 2003 7:43 am

how to logon to a site with logon name and password?

Post by SnOoPDoGg187 »

i need to know how i could log onto a site that requires u to logon to it with a logon name and password??

this is what i got but not sure on how to logon with a logon name and password. by the way this is to logon to a shoutcast server to get the current dj current song ect..

set file [open "|lynx -source $xbradio_url" r]

xbradio_url is the site to connect to but i have checked some scripts but i have not been able to find one that will let u logon to it with a lgon name and password..

one more question while i'm at it the site is using xml and i'm not sure how to get it to read the lines in it i have checked acouple to see how it's done but i don't understand it : (

like this line here

<SONGTITLE>Godsmack - I AM</SONGTITLE>

how would i cut out all the other stuff so it only returns the actuall song name??

thanks in advance for the help guys : )

if ya need me to paste more info let me know
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Note the URL you are using.

URL's use a standrd schema that is followed for allmsot all types, and in this case, should also be used.

<proto>://[<user>:<pass>@]<host>[:<port>]/[<uri>[?<parameters>]]

for http, or web-browsing,t his is

http://www.server.com/this/address/

or

http://username:password@www.server.com/this/addess/

FOllow this format for the URL.
S
SnOoPDoGg187
Voice
Posts: 17
Joined: Fri Apr 04, 2003 7:43 am

sweet thanks

Post by SnOoPDoGg187 »

thanks but i'm still kinda stuck on how to connect to the site and get the info i'm looking for from the page i can't find a site that reall shows me how to do it. it is al xml data and the format is like this

<CURRENTLISTENERS>1</CURRENTLISTENERS>
<PEAKLISTENERS>16</PEAKLISTENERS>
<MAXLISTENERS>32</MAXLISTENERS>
<REPORTEDLISTENERS>1</REPORTEDLISTENERS>

like that now what i need it to do is read like in the first line the currentlisteners i need it to read the currentlisteners and give me what's there in the text above that would be 1 same with the rest of the stuff also

this is the script i'm trying to use as a basis for all the stuff i'm trying to do

set online "false"
if {[file exists $targetfile]} { <-- i need it to read from the web page
set read [open $targetfile r]
while {![eof $read]} {
set inhalt [gets $read] <-- and here set a variabel guess like maxlisteners to inhalt so the rest of the script can read the current dj ect.

#-----------------------------------------------------Server title
#test whether in the next line yet somewhat stands (Line break)
if {[string match "*1*" $cserver]} {
set cserver "0"
if {![string match "*Source connected*" $inhalt]} {
set song "$song$inhalt"
}
}
set s "Stream title 'Radio: "
if {[string match "*Stream title*" $inhalt]} {
set radio [string trimright $inhalt "'"]
set radio [string trimleft $radio $s]
set online "true"
set cserver "1"
}

see this is from radio.tcl but it reads the info from a file i want it to goto the site and get the currentlisteners current dj and all stuff but i can't figure it out plz i need help : )

sorry i may have confused some people but i'm not sure how else to explain it hope some one can help me out

thanks in advanced
Locked