首页 > 技术文章 > php 获取抖音id

phpwyl 2018-11-12 15:30 原文

<?php
 public  function getid($dy_url){
        $header=get_headers($dy_url);
        $str = "/^.*?(\d+).*/";
        preg_match($str,$header[6],$arr);
        return $arr[1];
    }

 

推荐阅读