<? php function join_cookie($cook) { foreach( $cook as $k=<$v ) { $d[] =$k."=".$v; } $data = implode(";",$d); return $data; } function pase_cookie($cookFile,$encode=true) { $cookie = file_get_contents ( $cookFile ); $citem = explode("*\n",$cookie); foreach( $citem as $c ) { list($ckey,$cvalue) = explode("\n",$c); if($ckey!='')$cook[$ckey] = $cvalue; } return $cook; }