基于360影视采集实例

下面分享一下简单360影视采集代码:

 

PHP代码:

<?php
error_reporting(0);
header("Content-type:text/html;charset=utf-8");
$info = file_get_contents("http://www.360kan.com/dianying/list.php?cat=all&year=all&area=all&act=all&rank=createtime");
$vname = "#<span class=\"s1\">(.*?)</span>#";
$vlist = "#<a class=\"js-tongjic\" href=\"(.*?)\">#";
$vstar = "#<p class=\"star\">(.*?)</p>#";
$vimg = "#<div class=\"cover g-playicon\">\r\n                                <img src=\"(.*?)\">#";
$nname = "#<span class=\"hint\">(.*?)</span>#";
$fname = "#<span class=\"s2\">(.*?)</span>#";
$array = array();
preg_match_all($vname, $info, $namearr);
preg_match_all($vlist, $info, $listarr);
preg_match_all($vstar, $info, $stararr);
preg_match_all($vimg, $info, $imgarr);
preg_match_all($nname, $info, $nnamearr);
preg_match_all($fname, $info, $fnamearr);
$i = 0;
while ($i < 数量) {
	$gul = $listarr[1][$i];
	$zimg = $imgarr[1][$i];
	$zname = $namearr[1][$i];
	$fname = $fnamearr[1][$i];
	$nname = $nnamearr[1][$i];
	$zstar = $stararr[1][$i];
	$player = "play.php?play=" . $gul;
?>
<div class="col-md-2 col-sm-3 col-xs-4">
	<a class="videopic lazy" href="<?php echo $player;?>" title="<?php echo $zname;?>" data-original="<?php echo $zimg;?>" style="background: url(<?php echo $aik['pcdomain']?>images/load.gif) no-repeat; background-position:50% 50%; background-size: cover;">
	<span class="play hidden-xs"></span>
	<span class="score"><?php echo $fname;?></span></a>
	<div class="title">
		<h5 class="text-overflow"><a href="<?php echo $player;?>"><?php echo $zname;?></a></h5>
	</div>
	<div class="subtitle text-muted text-muted text-overflow hidden-xs">
	<?php echo $zstar;?>
	</div>
</div>
 
<?php $i = $i + 1; }?>

 

采集原理和爱客影视CMS,品优影视CMS几乎一样!

阿强爱分享
  • 本文由 发表于 2018年6月23日15:49:13
  • 转载请务必保留本文链接:https://iooqp.cn/34.html
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: