Skip to content

Instantly share code, notes, and snippets.

View lizheming's full-sized avatar
:octocat:

Austin Lee lizheming

:octocat:
View GitHub Profile
@lizheming
lizheming / sign.php
Created November 16, 2012 05:25
虾米自动签到php
<?php
set_time_limit(0);
/*输入账号密码*/
$name = '';
$password = '';
//获取登陆cookie
$curl_post = 'email='.$name.'&password='.$password.'&done=/&submit=登 录';
$cookie_file = dirname(__FILE__).'/cookie.txt';
$curl = curl_init();
@lizheming
lizheming / xiami.auto.sign.php
Created November 9, 2012 12:56
虾米自动签到模拟
<?php
$data = '';
$cookie_file = dirname(__FILE__).'/cookie.txt';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://www.xiami.com/task/signin");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($curl, CURLOPT_REFERER, 'http://www.xiami.com/');
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
@lizheming
lizheming / xiami.song.download.html
Created November 6, 2012 15:11
JS模拟循环PHP模拟最终POST提交
<script type="text/javascript">
//将第二步获得的代码复制到下面,记得删除最后一位数的逗号
var song = new Array(1769629171,3338870,1769902385,1770432131,2868586,1770149760,367633,1769832130,35526,1769962750,1770551145,1770457081,3486103,1769400110,127903,3367334,2078855,71830,376007,376015,2074918,2730,1770450144,3455520,79157,79151,81366,65256,390070,2138604,1770345727,376050,376006,149193,388168,1769665592,3497062,1769236069,3632104,1768923954,1769491757,3608275,2092882,1770354410,3480460,3620143,2095376,2561774,3664677,1770462404,1769056924,3527076,2126340,2089410,1769177482,2083322,1769831952,1769316186,1770524409,1769517803,1190507,1964547,1769107542,3486203,1769686818,1769028326,1858814,2084011,1769235816,1770614545,2083187,2605276,378268,2515019,1122167,1769176497,3302053,2083102,3638520,189072,371017,1770168732,1083760,2122948,2070331,2128868,3319126,2561592,1381654,3441719,1768939471,2091290,2098665,2067235,1770060224,3562953,54342,1769831786,1770145312,76323,2067242,173117,136054,1770068043,1769833104,1769833105,1769833106,1
@lizheming
lizheming / get.downloaded.songs.id.php
Created November 6, 2012 14:56
虾米已加载歌曲ID抓取
<?php
set_time_limit(0); //设置成不限制页面运行时间
$page = ''; //填写你的已经下载页面的页数
$cookie_file = dirname(__FILE__).'/cookie.txt';
$song = '';
//如果页数过多可以分批获取,以免等待时间过长
for($i=1;$i<=$page;$i++) {
$curl = curl_init();
@lizheming
lizheming / xiamilogin2getcookiesfile.php
Created November 6, 2012 14:30
模拟登陆虾米获取登陆后的COOKIES
<?php
$name = ''; //输入你的账号
$password = ''; //输入你的密码
$curl_post = 'email='.$name.'&password='.$password.'&done=/&submit=登 录';
$cookie_file = dirname(__FILE__).'/cookie.txt';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://www.xiami.com/member/login");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post);
@lizheming
lizheming / srun.login.all.html
Created October 26, 2012 07:06
srun.login.all
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>Srun Login!</title>
<style type="text/css">
iframe {
border:none;
width:100%;
display:block;
@lizheming
lizheming / ipv6.html
Created October 26, 2012 07:05
Srun IPv6 Login By HTML
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>Srun Login!</title>
<script type="text/javascript">
function submit() {
document.getElementById('submit').click();
}
</script>
@lizheming
lizheming / srun.php
Created October 25, 2012 15:44
Srun login and logout by php
<?php
/*
*Creat At 2012/10/25 23:29
*Author: Austin
*URL: http://imnerd.org
*Mail: i@imnerd.org
*Description: Srun Authorize Login & Logout By PHP
*/
//网关登陆:http://abc.com/srun.php?do=login
@lizheming
lizheming / srun.login.html
Created October 25, 2012 13:58
srun login by html form
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>Srun Login!</title>
<script type="text/javascript">
function submit() {
document.getElementById('submit').click();
}
</script>
@lizheming
lizheming / badge.php
Created October 23, 2012 10:05
PageCookery网站挂件主文件
<?php
header('Content-Type:application/javascript;charset=utf-8');
require_once("global.php");
if (!isset($_GET['mount'])){
$_GET['mount']='10';
}
?>
document.getElementById('pagecookery').innerHTML='<?php
if(ereg("^[0-9]*$",$_GET['mount'])){
$sql='SELECT * FROM entry ORDER BY time DESC LIMIT '.$_GET['mount'];