My blog on 51testing: http://www.51testing.com /? 77492 please help me move to my blog: http://www.cnblogs.com/zhuque/ I import rss myself, the imported data is incomplete, only the blog title, no content. For more than 300 blogs, the value is imported into 50. Please help me
1 my blog on 51testing: http://www.51testing.com /? 774922 3 please help me move to my blog: http://www.cnblogs.com/zhuque/
function parseMemcacheResults($str){ $res = array(); $lines = explode("\r\n",$str); $cnt = count($lines); for($i=0; $i< $cnt; $i++){ $line = $lines[$i]; $l = explode(' ',$line,3); if (count($l)==3){ $res[$l[0]][$l[1]]=$l[2]; if ($l[0]=='VALUE'){ // next line is the value $res[$l[0]][$l[1]] = array(); list ($flag,$size)=explode(' ',$l[2]); $res[$l[0]][$l[1]]['stat']=array('flag'=>$flag,'size'=>$size); $res[$l[0]][$l[1]]['value']=$lines[++$i]; } }elseif($line=='DELETED' || $line=='NOT_FOUND' || $line=='OK'){ return $line; } } return $res;}