酷酷博客 酷酷博客

腾讯获取视频VID

in 技术文章 read (1291) 文章转载请注明来源!
$_loc1_ = explode("/",$url);
if( strpos($url,"v.qq.com/x/cover") > 0 ){
    if( $_loc1_[6] ){
        $_loc2_ = explode(".",$_loc1_[6])[0];
        $data['vid'] = $_loc2_;
    }else{
        $_loc3_ = https_curl($url);
        preg_match("|<link rel=\"canonical\" href=\"([^(\}>)]+)\" />|",$_loc3_,$_loc4_);
        $_loc5_ = explode("/",$_loc4_[1]);
        $_loc6_ = explode(".",$_loc5_[6])[0];
        $data['vid'] = $_loc6_;
    }
}else if( strpos($url,"v.qq.com/x/page") > 0 ){
    if( $_loc1_[5] ){
        $_loc7_ = explode(".",$_loc1_[5])[0];
        $data['vid'] = $_loc7_;
    }else{
        $_loc8_ = https_curl($url);
        preg_match("|<link rel=\"canonical\" href=\"([^(\}>)]+)\" />|",$_loc8_,$_loc9_);
        $_loc10_ = explode("/",$_loc9_[1]);
        $_loc11_ = explode(".",$_loc10_[6])[0];
        $data['vid'] = $_loc11_;
    }
}
print_r($data);
jrotty WeChat Pay

微信打赏

jrotty Alipay

支付宝打赏

文章二维码

扫描二维码,在手机上阅读!

本文基于《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权
文章链接:https://www.pohaier.com/2018/04/13/4.html (转载时请注明本文出处及文章链接)

技术文章
发表新评论
已有 2 条评论
  1. blonde
    blonde
    回复

    As the admin of this website is working, no doubt very quickly it will be renowned, due to its feature contents.

    1. admin
      admin本文作者
      回复

      @blonde Thank you, Yoshikazu.

PREVIOUS NEXT
雷姆
拉姆