function checkICP($url = '', $type = '') { $url = trim($url); if(empty($url)) { return; } $htmltext = file_get_contents('http://api.befen.net/icp/'.$url); if(empty($htmltext)) { return; } if($type == 'all') { return $htmltext; } else { $icparr = explode(',', $htmltext); return $icparr[2]; } }