91地址解析

<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>地址解析</title>
</head>

<body>
<?php

 	$a = file(‘F:/91url.csv‘);
    foreach($a as $line => $content){
		$res = explode(‘,‘,$content);
		echo ‘line ‘.($res[0]).‘ : ‘.iconv(‘GB2312‘,‘UTF-8‘, $res[1]).‘ ‘.$res[2].‘<br />‘;
		$num=$res[0];
		$title=iconv(‘GB2312‘,‘UTF-8‘, $res[1]);
		$time=$res[2];
		$longtime=$res[4];
		$viewnum=$res[5];
		$source=$res[6];
 		geturl($num,$title,$time,$longtime,$viewnum,$source);
  }

 function geturl($num,$title,$time,$longtime,$viewnum,$source){

    //91porn解析,freeGet获得解析地址
	$url = "http://freeget.co/video/extraction";
	$post_data = "url=".$source;
	$post_data.="&X-CSRFToken=1467187852##479bcd4cbd4c61137a65a8a7419947fbdc32f478";
	$headers = array(
		‘Accept-Encoding:utf-8, deflate‘,
		‘Accept-Language:zh-CN,zh;q=0.8‘,
		‘Content-Length:127‘,
		‘Content-Type:application/x-www-form-urlencoded; charset=UTF-8‘,
		‘Cookie:incap_ses_401_649914=31EbXVOgx0r6Ql5TmqOQBdjxdFcAAAAAu7MrrqICFZvpjsIw5VriGQ==; incap_ses_434_649914=wx2HcnWH7GDQCChRweAFBt/xdFcAAAAAczn9Ohl2VBPqxEd8kRi2GA==; visid_incap_649914=2hb3ym0OQ9C7sr1krqKCQTUObVcAAAAAQUIPAAAAAADQQCM/QP5jhCXO3+mlIKmg; incap_ses_199_649914=5f1kYgea2E82s51Ks/3CAgHydFcAAAAA0t8X/XhyGO6vLAivDqiKDQ==; incap_ses_406_649914=vs5zGBHLcDl2DJYFemeiBSHydFcAAAAAdokyZQkGGNWotlqD7VNjJg==; incap_ses_407_649914=U4VYNM5iO1l1H0VP7/SlBWXydFcAAAAAifL73Yq/OnIgRqKWiWPqUg==; _ga=GA1.2.1738858661.1466764840; _gat=1; session=eyJfZnJlc2giOmZhbHNlLCJjc3JmX3Rva2VuIjp7IiBiIjoiTkdFek9HRmtNakkxTldVM05EVXpZMkZoTldKaE5tWXpOV014TlRBNU1UZ3dPVGcyTkRNMU5BPT0ifX0.ClaHmg.RREoQo7DozBdXN48AaSMjL3DkhE‘,
		‘Host:freeget.co‘,
		‘Origin:http://freeget.co‘,
		‘Proxy-Connection:keep-alive‘,
		‘Referer:http://freeget.co/‘,
		‘User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36‘,
		‘X-CSRFToken:1467286379##5c7b9f276ed86f80c0d9eb4ebd43ec1e1204644f‘,
		‘X-Requested-With:XMLHttpRequest‘,
	);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);        //设置URL
    curl_setopt($ch, CURLOPT_HEADER, true);        //设置显示响应头
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);//设置参数
    $content = curl_exec($ch);

    $headArr = explode("\r\n", $content);        //解析url
    foreach ($headArr as $loop) {
	  if(strpos($loop, "token") !== false){//找到token
            $token = trim(substr($loop, 11,36));
      }
	  if(strpos($loop, "view_key") !== false){//找到view_key
            $view_key = trim(substr($loop, 63,20));
      }
    }
	//echo $loop."<br />";
	$url001=‘http://freeget.co/video/‘.$view_key.‘/‘.$token;
	echo ‘视频解析地址:<a href=‘.$url001.‘ target="_blank">‘.$url001.‘</a><br />‘;
	//http://freeget.co/video/e2eff4de4577f02ecaff/e3a0cb68-0b61-4d10-aba0-34c1a6c00a05
    curl_close($ch);

	$User_Agent="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0";
	$cookie=‘incap_ses_401_649914=31EbXVOgx0r6Ql5TmqOQBdjxdFcAAAAAu7MrrqICFZvpjsIw5VriGQ==; incap_ses_434_649914=wx2HcnWH7GDQCChRweAFBt/xdFcAAAAAczn9Ohl2VBPqxEd8kRi2GA==; visid_incap_649914=2hb3ym0OQ9C7sr1krqKCQTUObVcAAAAAQUIPAAAAAADQQCM/QP5jhCXO3+mlIKmg; incap_ses_199_649914=5f1kYgea2E82s51Ks/3CAgHydFcAAAAA0t8X/XhyGO6vLAivDqiKDQ==; incap_ses_406_649914=vs5zGBHLcDl2DJYFemeiBSHydFcAAAAAdokyZQkGGNWotlqD7VNjJg==; incap_ses_407_649914=U4VYNM5iO1l1H0VP7/SlBWXydFcAAAAAifL73Yq/OnIgRqKWiWPqUg==; _ga=GA1.2.1738858661.1466764840; _gat=1; session=eyJfZnJlc2giOmZhbHNlLCJjc3JmX3Rva2VuIjp7IiBiIjoiTkdFek9HRmtNakkxTldVM05EVXpZMkZoTldKaE5tWXpOV014TlRBNU1UZ3dPVGcyTkRNMU5BPT0ifX0.ClaHng.htbZv-MQsVDV4hm8gTq3JuRzk84‘;   

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url001);        //设置URL
    curl_setopt($ch, CURLOPT_COOKIE, $cookie);        //设置cookies
    curl_setopt($ch,CURLOPT_USERAGENT,$User_Agent); //设置代理浏览器
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $content = curl_exec($ch);
    $content=strip_tags($content);//去除html标签
    //echo $content;
    if(strpos($content, "http://91.p9p.co/ev.php") == true){//找到Location
            $purl = trim(substr($content, strpos($content, "http://91.p9p.co/ev.php"),98));
			echo ‘在线播放地址:<a href=‘.$purl.‘ target="_blank">‘.$purl.‘</a><br />‘;
			writ($num,$title,$time,$longtime,$viewnum,$purl);
     }
	curl_close($ch);

	$vid=substr($purl,29,60);
	$vid="http://91.p9p.co/getfile_jw.php?VID=".$vid;
	//echo ‘下载地址:<a href=‘.$vid.‘ target="_blank">‘.$vid.‘</a><br /><br />‘;
	//http://91.p9p.co/getfile_jw.php?VID=6b66GePT6a7fbG4S9OtDVEi8UjkIordpwUYHz8IQenHTURLd
 };

 function writ($num,$title,$time,$longtime,$viewnum,$url){
		$file = "F:/data.txt";
		$content = $num.‘,‘.$title.‘,‘.$time.‘,‘.$longtime.‘,‘.$viewnum.‘,‘.$url."\r\n";    //要写入的内容
		if(!$fp = fopen($file,‘a+‘))                           //打开文件$file时,使用追加模式,此时文件指针会在文件开始处
		{
			echo "打开文件$file失败!";
		}
		if(fwrite($fp,$content) === false)                    //将内容写入文件
		{
			echo "写入文件失败!";

		}
		else
		{
			echo "写入成功!<br />";
		}
		fclose($fp);
 }

?>
</body>
</html>

  

时间: 2024-10-27 12:28:54

91地址解析的相关文章

百度地图API实现批量地址解析

1.前言 写这篇文章的原因是最近做一个GIS项目在网上爬取了一些数据,无奈只有地址的文字信息没有坐标信息,如何把信息显现在地图上呢?很纠结啊,查看了一下百度地图API惊奇的发现百度提供了地址解析的API,然后查看了他的Demo后豁然开朗,所以动手将自己的文字信息数据进行解析坐标信息.下面开始讲解. 2.方案 (1)自己数据库中的数据 (2)百度地图API Demo <!DOCTYPE html> <html> <head> <meta http-equiv=&qu

WIN7下使用VC2010调试uCOS-II 2.91

WIN7下使用VC2010调试uCOS-II 2.91 http://www.amobbs.com/thread-5462878-1-1.html ucos系统学习汇总 http://www.cnblogs.com/gmh915/category/212499.html WIN7下使用VC2010调试uCOS-II 2.91,码迷,mamicode.com

Inter地址及地址解析

地址解析协议ARP: 在Kalia-Linux虚拟机上打开指令面板,敲入指令: arpspoof -i eth0 -t 172.28.15.4 172.28.15.254; 通过eth0的端口(-t)不断地欺骗(172.28.15.4) 输入driftnet: arpspoof -i eth0 -t 172.28.15.254 172.28.15.4; 通过172.28.15.254这个网关看到172.28.15.4的图片: 可以看到你欺骗的人的所加载出来的图片 输入以下指令:echo 1 >p

Unity3D 视频教程列表,共 91 套!

Unity3D 视频教程列表,共 91 套 [000001]<Unity3D Platform 中文视频教程>[7课时] [000002]<Unity3D 游戏蛮荒之地教学视频>[15课时] [000003]<Unity3D 坦克克星视频教程>[9课时] [000004]<Unity3D 太空射击游戏中文视频>[17课时] [000005]<Unity3D 切水果视频教程>[9课时] [000006]<Unity3D 精神時光屋>[5

ERROR&lt;53761&gt; - Plugins - conn=-1 op=-1 msgId=-1 - Connection Bind through PTA failed (91). Retrying...

LDAP6.3在DSCC控制台启动实例完成,但是操作状态显示“意外错误”,查看日志如下: 04/May/2016:21:10:39 +0800] - Sun-Java(tm)-System-Directory/6.3 B2008.0311.0224 (32-bit) starting up[04/May/2016:21:10:39 +0800] - Listening on all interfaces port 11111 for LDAP requests[04/May/2016:21:10

修改DNS域名转发器解决IP地址解析错误导致的网站不能访问

修改DNS域名转发器解决IP地址解析错误导致的网站不能访问 首先谢谢同事林路的指导,才能顺利解决问题 打开网站,访问一个域名,DNS解析到错误的IP地址,那么将不能正确访问该网站 1.使用8.8.8.8(google 公用dns定位本地dns解析和google解析),这里是zh.wikipedia.org ping zh.wikipedia.org     159.106.121.75(这个是很多dns异常解析的地址) nslookup -qt zh.wikipedia.org 8.8.8.8

地图:CLGeocoder地址解析与反地址解析

1.导入系统框架 /** *  界面效果1 实现定位到输入的地址,并且提示出地址的经纬度 */        2.viewcontroller.h #import <UIKit/UIKit.h>#import <MapKit/MapKit.h>@interface ViewController : UIViewController @property (strong, nonatomic) IBOutlet UISearchBar *searchBar;@property (str

[email&#160;protected] [91] Decode Ways (Dynamic Programming)

https://leetcode.com/problems/decode-ways/ A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine the total number of wa

优酷真实视频地址解析2015-11-24

11月24日起优酷视频破解算法又发生了变化,相比以前几个月改一次,这个算法维持了1年多,也算是蛮良心的,23333. 今早起来发现优酷的视频都播不了了,一查究竟,原来是算法中的一步又改了.目前优酷视频源算法基本还是沿用3shi和这位大大的思路,请详细阅读<优酷真实视频地址解析——2014年10月7日> 当然,到2015年11月24日,算法中第二步“获取视频元信息”的请求API: http://v.youku.com/player/getPlayList/VideoIDS/{vid}/Pf/4/