Share code get link video tiktok

Share code get link video tiktok

Share code get link video tiktok

<?php
function getContent($url)
  {
    $ch = curl_init();
    $options = array(
        CURLOPT_URL            => $url,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HEADER         => false,
        CURLOPT_FOLLOWLOCATION => true,
// Please change the user agent every time when the script stops working.
        CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36',
        CURLOPT_ENCODING       => "utf-8",
        CURLOPT_AUTOREFERER    => true,
        CURLOPT_CONNECTTIMEOUT => 30,
        CURLOPT_SSL_VERIFYHOST => false,
      CURLOPT_SSL_VERIFYPEER => false,
        CURLOPT_TIMEOUT        => 30,
        CURLOPT_MAXREDIRS      => 10,
    );
    curl_setopt_array( $ch, $options );
    if (defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4')) {
      curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
    }
    $data = curl_exec($ch);
    $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    return strval($data);
  }
?>
<!DOCTYPE html>
<html>
<head>
<title>TikTok Video Downloader</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css2?family=Gotu&display=swap" rel="stylesheet">
<style type="text/css">
html, body
{
font-family: "Gotu"
}
input
{
padding: 5px;
border-radius: 10px;
border-style: solid;
border-color: blue;
transition-duration: 0.5s;
width: 80%;
}
input:focus
{
border-color: skyblue;
transition-duration: 0.5s;
}
</style>
</head>
<body class="bg-light">
<div class="text-center p-5">
<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjlweCIgaGVpZ2h0PSIzMnB4IiB2aWV3Qm94PSIwIDAgMjkgMzIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDU1LjIgKDc4MTgxKSAtIGh0dHBzOi8vc2tldGNoYXBwLmNvbSAtLT4KICAgIDx0aXRsZT7nvJbnu4QgMjwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxnIGlkPSLpobXpnaIxIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0i57yW57uELTIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuOTc5MjM2LCAwLjAwMDAwMCkiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMC43OTA3NjQ1LDEyLjMzIEwxMC43OTA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AuNTM1NDg2MiA3NS4wMTg2NDU1LDguMjg2OTk3NjQgNzMuMzYwODIzOSw2LjYyOTE3NjA1IEM3MS43MDMwMDI0LDQuOTcxMzU0NDcgNjkuNDU0NTEzOCw0LjA0IDY3LjExLDQuMDQgWiIgaWQ9IuW9oueKtiIgZmlsbD0iIzAwMDAwMCI+PC9wYXRoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" alt="TikTok"> video easily!</h1>
</div>
<div class="text-center">
Paste a video url below and press "Download"
<form method="POST" class="mt-2">
<input type="text" placeholder="https://www.tiktok.com/@username/video/1234567890123456789" class="mb-3" name="tiktok-url"><br>
<button class="btn btn-success" type="submit">Download</button>
</form>
</div>
<?php
if (isset($_POST['tiktok-url']) && !empty($_POST['tiktok-url'])) {
$url = $_POST['tiktok-url'];
$resp = getContent($url);
//echo "$resp";
$check = explode("\"contentUrl\":\"", $resp);
if (count($check) > 1){
$contentURL = explode("\"",$check[1])[0];
$thumb = explode("\"",explode("\"thumbnailUrl\":[\"", $resp)[1])[0];
$username = explode("/",explode("@",explode("\"",explode("\"url\":\"", $resp)[1])[0])[1])[0];
?>
<div class="border m-3 mb-5">
<div class="row m-0 p-2">
<div class="col-sm-5 col-md-5 col-lg-5 text-center"><img width="250px" height="250px" src="<?php echo $thumb; ?>"></div>
<div class="col-sm-6 col-md-6 col-lg-6 text-center mt-5"><ul style="list-style: none;padding: 0px">
<li>a video by <b>@<?php echo $username; ?></b></li>
<li><button class="btn btn-primary mt-3" onclick="window.location.href='<?php echo $contentURL; ?>'">Download Video</button></li>
<li><div class="alert alert-primary mb-0 mt-3">If the video opens directly, try saving it by pressing CTRL+S or on phone, save from three dots in the bottom right corner</div></li>
</ul></div>
</div>
</div>
<?php
}
else
{
?>
<div class="mx-5 px-5 my-3">
<div class="alert alert-danger mb-0"><b>Please double check your url and try again.</b></div>
</div>
<?php
}
}
?>
<div class="m-5">
&nbsp;
</div>
<div class="bg-dark text-white" style="position: fixed; bottom: 0;width: 100%;padding:15px">Developed by <a target="_blank" href="https://www.github.com/TufayelLUS">tufayel.rocks</a> <span style="float: right;">Copyright &copy; <?php echo date("Y"); ?></span></div>
</body>
</html>

Cách 2

 <?php
/**
 * Class TiktokDownloader
 *
 * @author Furkan Sezgin (ZquaRe)
 * @mail furkan-sezgin@hotmail.com
 */
class TiktokDownloader
{
    public function Download($url)
    {
        if (preg_match("#tiktok.com#",$url))
        {
        // m.tiktok.com Checking if logged in or not
        if (preg_match("#Redirecting to <a href=#", $this->cUrl($url)))
        {
            $newUrl = explode('<a href="', $this->cUrl($url));
            $newUrl = explode('">', $newUrl[1]);
            $url = $newUrl[0];
        }
        preg_match_all('#<video playsinline="" loop="" src="(.*)#', $this->cUrl($url) , $Result);
        @$ResultExp = explode('<video playsinline="" loop="" src="', $Result[0][0]);
        @$ResultFinally = explode('preload="', $ResultExp[1]);
        return $ResultFinally[0];
        }
        else
        {
            return null;
        }
    }
    private function cUrl($url)
    {
        $user_agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36';
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
        $result = curl_exec($ch);
        curl_close($ch);
        return $result;
   
    }
}



$Tiktok = new TiktokDownloader();

if (isset($_POST['q'])) {
    $Url = $_POST['q'];
    if (!empty($Url)) {
        if (filter_var($Url, FILTER_VALIDATE_URL)) {
        if($Tiktok->Download($Url) != null){
        ?>
<!doctype html>
<html lang="en">
   <head>
      <!-- Required meta tags -->
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      <!-- Bootstrap CSS -->
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
      <title>Tiktok Video Download</title>
   </head>
   <body>
      <div class="container" style="margin-top:50px;">
      <div class="card">
         <h5 class="card-header">
            Tiktok Video Download
         </h5>
         <div class="card-body">
<video width="300" height="300" controls>
  <source src="<?php echo $Tiktok->Download($Url); ?>" type="video/mp4">
Your browser does not support the video tag.
</video>
            <br/><br/>
<a href="<?php echo $Tiktok->Download($Url); ?>" class="btn btn-danger" target="_blank" download>Download Tiktok Video</a>
<br/><br/> <button onclick="  window.history.back();" class="btn btn-secondary">Go Back</button>
         </div>
      </div>
      <!-- Optional JavaScript -->
      <!-- jQuery first, then Popper.js, then Bootstrap JS -->
      <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
      <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
      <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
   </body>
</html>
<?php
    } else {
        echo 'The video could not be resolved, check the url.';
    }
    } else {
        echo 'Url is not in the correct format.';
    }
    } else {
        echo 'The field cannot be left blank.';
    }
    } else {
?>
<!doctype html>
<html lang="en">
   <head>
      <!-- Required meta tags -->
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      <!-- Bootstrap CSS -->
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
      <title>Tiktok Downloader</title>
   </head>
   <body>
      <div class="container" style="margin-top:50px;">
      <div class="card">
         <h5 class="card-header">
            Tiktok Downloader
         </h5>
         <div class="card-body">
        <form action="" method="post">
            <div class="input-group">
               <input type="text" class="form-control" name="q" placeholder="Example: https://www.tiktok.com/@ponciklendin/video/6786553850611469573">
               <div class="input-group-append">
                  <button type="submit" class="btn btn-danger">Download</button>
               </div>
            </div>
       </form>
            <br/>
            <p class="card-text">
               Example:
               <br/> https://www.tiktok.com/@ponciklendin/video/6786553850611469573
               <br/> or
               <br/> https://m.tiktok.com/v/6786553850611469573.html
            </p>
         </div>
      </div>
      <!-- Optional JavaScript -->
      <!-- jQuery first, then Popper.js, then Bootstrap JS -->
      <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
      <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
      <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
   </body>
</html>

<?php } ?>

Cách 3

 <?php
function auto($url) {
    $ch = @curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    $head[] = "Connection: keep-alive";
    $head[] = "Keep-Alive: 300";
    $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
    $head[] = "Accept-Language: en-us,en;q=0.5";
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36');
    curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
    $page = curl_exec($ch);
    curl_close($ch);
    return $page;
}
$url = $_POST['url'];
function get_link($url){
if(!empty($url)):
$result = auto($url);
$result = explode('"video":{"urls":["', $result);
$result = explode('"', $result[1]);
$result = str_replace('.*src="','',$result[0]);
return $result;
        endif;
}
IF ($url){
Echo  get_link($url);
}
?>
Download no watermark :TikTok-Video-Downloader-PHP

Bài viết liên quan:

https://severphim.blogspot.com/2020/04/share-code-get-link-video-tiktok.html

Nhận Xét Facebook

Chờ xíu nhé...

Nhận Xét Blogger


Không có nhận xét nào. bạn hãy là người đầu tiên.