$cur_row = 0; $cur_col = 0; $curstate = getcurstate($content); curl_setopt($ch, CURLOPT_URL, 'http://ekeystone.com/WebPage.aspx?pn=1100000BrowseByDescr'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "name=_ctl0:_ctl6:_ctl0"); $content = curl_exec ($ch); $curstate = getcurstate($content); ///TEST //for ($i = 65; $i < 92; $i++) for ($i = 65; $i < 92; $i++) { $data_next = false; $data_now = false; $inputbefore = false; $html = ""; echo "getting cat $i.
"; if($i == 65) { curl_setopt($ch, CURLOPT_URL, 'http://ekeystone.com/WebPage.aspx?pn=1100000BrowseByDescr'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "name=_ctl0:_ctl6:_ctl0"); $content = curl_exec ($ch); } else { curl_setopt($ch, CURLOPT_URL, 'http://ekeystone.com/WebPage.aspx?pn=1100000BrowseByDescr'); curl_setopt($ch, CURLOPT_POST, 1); $POSTAL = array('__VIEWSTATE' => $curstate, '__EVENTTARGET' => "lblbbd".$i, '__EVENTARGUMENT' => '', 'SearchOptions' => 'rb1Search', 'txtSearchKey' => ''); curl_setopt($ch, CURLOPT_POSTFIELDS, $POSTAL); $content = curl_exec ($ch); } //echo $content; $html = $content; $parser = new HtmlParser ($html); while ($parser->parse()) { echo "INSIDE WHILE"; $attributes = $parser->iNodeAttributes; echo "AFTER END OF ELSE"; } echo "while is done"; //echo "
";


}