interpim Posted September 1, 2008 Share Posted September 1, 2008 This doesn't complete... just continually tries to load :/ function char_parse($name,$server,$class){ $URL="http://realmwar.warhammeronline.com/realmwar/UserLoginAuthentication.war"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"$URL"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefilename"); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefilename"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "user=$beta_username&password=$beta_password"); $pageResults = curl_exec($ch); curl_setopt($ch, CURLOPT_URL, "http://realmwar.warhammeronline.com/realmwar/CharacterSearch.war?characterKeyword=$name&server=$server&career=$class"); $blah = curl_exec($ch); $blah = explode("TableBoxRow2",$blah); $info = explode("</a>",$blah[1]); $info = explode('"',$info[0]); $info = $info[1]; $char_url = "http://realmwar.warhammeronline.com/realmwar/" . $info; curl_setopt($ch, CURLOPT_URL, $char_url); $char_page = curl_exec($ch); $char_page = explode("charprofile",$char_page); $char_page = explode("<!--infobox-->",$char_page[1]); $char_page = $char_page[0]; $char_page = explode("</div>",$char_page); $name = $char_page[1]; $career = $char_page[2]; $rank = $char_page[4]; $renown = $char_page[10]; Return compact('name', 'career', 'rank', 'renown') ; } Link to comment https://forums.phpfreaks.com/topic/122244-why-doesnt-this-work/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.