preg_match_all("/<IMG.*>/i",$htmlcod,$regs);
echo "共有".count($regs)."个";