<?php
require_once THINKROOT.'/letutao/fun.base.php';

  $str= file_get_contents("http://rate.taobao.com/detail_rate.htm?userNumId=1582962751&auctionNumId=35289746333&showContent=1");
  $darrstr = mb_convert_encoding($str,"UTF-8","gb2312");
  $arrstr =explode('"rateContent":"',$darrstr);
  print_r( $darrstr);
  foreach ($arrstr as $itme)
		{
    $doarrstr =explode('","rateDate"',$itme);
	$i=0;
	foreach ($doarrstr as $iitme)
		{
		if(($i/2)=='0' && !strstr($iitme,'scoreInfo')){
		 $iitmecmt =explode(',',$iitme);	
						$arrData	= array(
						'shareid'			=> intval($shareid),
						'userid'			=> '0',
						'content'	        => $iitmecmt[0],
						'addtime'		    => time(),
					);
					
         $Item = array();
		  foreach($arrData as $key=>$data){
			$Item[] = "$key='$data'";
		}
		$intStr = implode(',',$Item);
		$sql = "insert into $table  SET $intStr $where";
					//统计评论数
			print_r($sql);
					
					}
				$i++;
			}
			}
			
			
	
			
?>