- 18, May 2024
- #1
Видите ли, я рассматриваю этот код
<?php
error_reporting(E_ERROR | E_PARSE);
function curl_Xvideos($url)
{
$ch = @curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
$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 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3B48b Safari/419.3');
curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_ENCODING , 'gzip, deflate');
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 = str_replace(' ', '', $url);
if(!empty($url)):
curl_setopt($curl = curl_init($url), CURLOPT_RETURNTRANSFER, 1);
preg_match("/flv_url=(.+)url_bigthumb=([^&]+)/i", curl_exec($curl), $infos);
curl_close($curl);
header("Location: ".urldecode($infos[1]));
endif;
}
function Xvideos($link) {
$view_source = curl_Xvideos($link);
$data = explode("new HTML5Player('html5video',", $view_source);
$data = explode("[URL='https://lumtu.com/yti/bQaaQbWdodHRwOi8viOw']http://img[/URL]", $data[1]);
$data = explode("', '", $data[0]);
foreach($data as $i => $mp4)
{
if(strpos($mp4, '/videos/mp4/'))
$list .= 'ลิงก์เสริม 360P=>'.trim($mp4).'|';
}
return rtrim($list, '|');
}
Код (разметка):