1 function getRealURL($url){
 2     $header = get_headers($url,1);
 3     if (strpos($header[0],'301') || strpos($header[0],'302')) {
 4         if(is_array($header['Location'])) {
 5             return $header['Location'][count($header['Location'])-1];
 6         }else{
 7             return $header['Location'];
 8         }
 9     }else {
10         return $url;
11     }
12 }            

 

相关文章:

  • 2022-12-23
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2021-08-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
相关资源
相似解决方案