howdy agian all,
... still working this imdb search script... BUT, i have a different question.... in this part of the code:
on *:sockopen:movieinfo1: {
sockwrite -n $sockname GET /find?q= $+ $replace(%movietitle,$chr(32),$(%20,)) $+ ;s=all HTTP/1.1
sockwrite -n $sockname Host: www.imdb.com $+ $crlf $+ $crlf
set %zinfonumber 1
;echo -at Succesfully Opened Socket
}
on *:sockread:movieinfo1:{
if ($sockerr) {
;echo -a Error
Halt
}
else {
var %tmptxt
sockread -f %tmptxt
;echo -a %tmptxt
if (Location: isin %tmptxt) {
set %movieinfolink2 $remove(%tmptxt,Location: http://www.imdb.com)
sockopen movieinfo2 www.imdb.com 80
}
else {
if (<p><b>Popular Titles</b> isin %tmptxt) {
set %movieinfolink2 $gettok(%tmptxt,2,34)
echo -a %movieinfolink2
sockopen movieinfo2 www.imdb.com 80
}
}
}
}
it opens socket 1 and starts the search blah,blah,blah.. which is fine. but however the search page comes up with multiple results for same title example:
Popular Titles (Displaying 2 Results)
All the King's Men (1949)
All the King's Men (2006)
the code as is grabs the first link it sees (basicly) in the search results and proceeds to open that with the second socket..
so my question is this:
how can i catch all the links in this part of page and have them listed in a list box? i pretty much can figure out the rest from there..
here's what the sorce code looks like:
<p><b>Popular Titles</b> (Displaying 2 Results)<ol><li> <a href="/title/tt0041113/" onclick="set_args('tt0041113',1,1)">All the King's Men</a> (1949)</li>
<li> <a href="/title/tt0405676/" onclick="set_args('tt0405676',2,1)">All the King's Men</a> (2006)</li>
</ol>
</p>
please if anyone can help.. it would be appreciated greatly!
thanks in advance
**EDIT - in addition is it possible to have those links look as they do on the page for easy selection in the list box?