haiishq Posted July 5, 2007 Share Posted July 5, 2007 ok friends, i am working on a little project what i want to do is to get a generated play list from a music site. the site codes are written like this. (extracted version & html file has been attached) <head> <script language="javascript" type="text/javascript"> <!-- var win=null; var disabled={}; function play() { window.open("http://player5.pz10.com/player/","player","'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=470,height=350") } // --> </head> <body> <form onsubmit=play() name=f1 target=player method=post action="http://player5.pz10.com/player/"> <p align=right class=albumtxt><p align="right" class="p_txt1 p_1">Track Listing<hr color="#C0C0C0" size="1"><img src="http://i.pz10.com//music/play.gif" width="150" heigth="35"><br><span class="p_txt1 p_1"><input type=checkbox value=194254 name=pick[]> 1.<b>Janaab <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194254')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b> <a class="p_txt1 p_2" href="http://lyrics.pz10.com/listlyrics.php?track=1063">Lyrics</a><br><span class="p_txt1 p_1"><input type=checkbox value=194255 name=pick[]> 2.<b>Wrong Number <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194255')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><span class="p_txt1 p_1"><input type=checkbox value=194256 name=pick[]> 3.<b>BilloTere Nakhre <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194256')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><span class="p_txt1 p_1"><input type=checkbox value=194257 name=pick[]> 4.<b>Serious <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194257')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><span class="p_txt1 p_1"><input type=checkbox value=194258 name=pick[]> 5.<b>Mittae Ganeh <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194258')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><span class="p_txt1 p_1"><input type=checkbox value=194259 name=pick[]> 6.<b>Ek Kuri <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194259')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><span class="p_txt1 p_1"><input type=checkbox value=194260 name=pick[]> 7.<b>Aashiq Dig Dig <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194260')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><span class="p_txt1 p_1"><input type=checkbox value=194261 name=pick[]> 8.<b>Mirza Boliyan <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194261')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><span class="p_txt1 p_1"><input type=checkbox value=194262 name=pick[]> 9.<b>Ni Amiye <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194262')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><span class="p_txt1 p_1"><input type=checkbox value=194263 name=pick[]> 10.<b>Pounda Naal <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194263')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><span class="p_txt1 p_1"><input type=checkbox value=194264 name=pick[]> 11.<b>Yaar Laoni <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194264')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><span class="p_txt1 p_1"><input type=checkbox value=194265 name=pick[]> 12.<b>Billo Tere Nakhre (Tigerstyle Remix) <input style="font-family: Verdana; font-size: 7pt; color: #CC0000; width: 78; height: 20; border: 1px solid #FFFFFF; background-color: #FFFFFF" type=button value="+ My Playlist" onclick="java script:popUp('http://music.pz10.com/myplaylist/add.php?songid=194265')"> <b><a class="p_txt1 p_2" href="http://music.pz10.com/signup.php"><!--Download--></a></b><br><input type=checkbox name=abx value=Check All onclick=cka('f1','pick[]','abx');> Select All the Above Songs</span><hr color="#C0C0C0" size="1"> <input type=radio value=iexplore name=browser checked> Internet Explorer <input type=radio value=mfirefox name=browser> Mozilla <input type=radio value=standalone name=browser> Standalone <input type=hidden name=typeid value=7 > <input type=hidden name=albumname value="Janaab" > <input type=hidden name=albumid1 value="9675" > <input type=hidden name=singername value="Northern Nights" > <input type=hidden name=tracks value="12" > <input type=hidden name=rating value="8.7500" > <input type=hidden name=typename value="UK Punjabi" > <br><br> <input type=Submit value="Play Selected Songs" name=submit style="font-family: Verdana; font-size: 9pt; "> </form> and this is what i have so far #include <HTTP.au3> #cs browser=standalone typeid=7 albumname=Janaab albumid1=9675 singername=Northern Nights tracks=12 rating=8.7500 typename=UK Punjabi #ce Call('GetPlayList') Func GetPlayList() $soc = _HTTPConnect ("player5.pz10.com") $data = "browser=standalone" & "&typeid=7" & "&albumname=Janaab" & "&albumid1=9675" & "&singername=Northern Nights" & "&tracks=12" & "&rating=8.7500" & "&typename=UK Punjabi" $data = "Name=Browser" _HTTPPost ("www.player5.pz10.com", "/player/index.php", $soc, $data) $recv = _HTTPRead ($soc, 1) QuickOutput("Response.html", $recv, 2) If Not @error Then $return = 1 MsgBox('', '', "Sent") Else $return = 0 MsgBox('', '', "Not Sent") EndIf _HTTPClose ($soc) Return $return EndFunc ;==>GetPlayList Func QuickOutput($Filename, $Output, $Mode) Local $File = FileOpen($Filename, $Mode) FileWriteLine($File, $Output) FileClose($File) EndFunc ;==>QuickOutput Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 5, 2007 Share Posted July 5, 2007 Why do you set $data to a long, complicated string, then overwrite it immediately with: $data = "browser=standalone" & "&typeid=7" & "&albumname=Janaab" & "&albumid1=9675" & "&singername=Northern Nights" & "&tracks=12" & "&rating=8.7500" & "&typename=UK Punjabi" $data = "Name=Browser" Surely that's not what you wanted? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
haiishq Posted July 8, 2007 Author Share Posted July 8, 2007 Why do you set $data to a long, complicated string, then overwrite it immediately with: $data = "browser=standalone" & "&typeid=7" & "&albumname=Janaab" & "&albumid1=9675" & "&singername=Northern Nights" & "&tracks=12" & "&rating=8.7500" & "&typename=UK Punjabi" $data = "Name=Browser" Surely that's not what you wanted? well thankx for you help but i already have it figured it out thankx for respoding anyway Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now