All pastes #410623 Raw Edit

Untitled

public text v1 · immutable
#410623 ·published 2007-03-26 15:27 UTC
rendered paste body
function get_item($cookie_file_path,$item_no,$price){
........................... i put these 
	$page = $result;
	
	$s = array('<button type="submit" class="VIPriBtn" name="input_bid"><span class="btn"><span class="btn">Place Bid &gt;</span></span></button>');
	$r = array('<button type="button" onclick="window.location=\'eBayISAPI.dll.php\'" class="VIPriBtn" name="input_bid"><span class="btn"><span class="btn">Buy It Now &gt;</span></span></button>');
	
	$page = str_replace($s,$r,$page);
	
	preg_match_all("#<h1 class=\"itemTitle\">(.*?)</h1>#s",$result,$title);  
 
	$title = str_replace("\n","",$title[1][1]);
	
	//preg_match_all("#id=\"DetailsCurrentBidValue\"><b>(.*?)</b>#s",$result,$price);  
	
	//$price = $price[1][0];
	
	
	preg_match_all("#ViewFeedback&amp;userid=(.*?)&amp#s",$result,$seller);  
	
	$seller = $seller[1][0];
	
	
	$return['page'] = $page;
	$return['price'] = $price;
	$return['title'] = $title;
	$return['item'] = $item_no;
	$return['seller'] = $seller;
	
	return $return;
	
}