调用尘落影视网的资源,也可自行替换
源码如下:<?php
header("Content-type: text/html; charset=utf-8");
$movie=$_GET['movie'];
date_default_timezone_set('PRC');
function posturl($url,$post){
$posturl = $url;
$curlPost= $post;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
$data = curl_exec($ch); curl_close($ch);
return $data;
}
$url="http://www.50s.cc/?c=search";
$post="wd=".$movie;
$get=posturl($url,$post);
$get = str_replace(array("\r\n", "\r", "\n"), "",$get);
$zz='#(.*?)#';
preg_match($zz,$get,$out);
$name=$out[1];
$lj="http://www.50s.cc".$out[2];
$photo=$out[6];
echo "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>片名:《".$name."》提示:没找到想要的结果可以 试试直接去本站搜索!点击这里立即观看";
?>
晨风机器人调用方式: