Skip to content

Instantly share code, notes, and snippets.

@fanmingfei
Last active January 3, 2016 05:49
Show Gist options
  • Save fanmingfei/8417895 to your computer and use it in GitHub Desktop.
Save fanmingfei/8417895 to your computer and use it in GitHub Desktop.
<?
$mm=$_POST['mm'];
$url='http://202.194.48.11:9004/loginAction.do';
$post="zjh=$zjh&mm=$mm";
$cookie_file=tempnam('./tmp','cookie');
$ch = curl_init($url) ;
curl_setopt($ch,CURLOPT_HEADER,0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) ;
curl_setopt($ch, CURLOPT_POST,1) ;
curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie_file);
curl_setopt($ch, CURLOPT_POSTFIELDS,$post);
curl_exec($ch);
curl_close($ch);
$url='http://202.194.48.11:9004/bxqcjcxAction.do';
$ch = curl_init() ;
curl_setopt($ch, CURLOPT_URL,$url) ;
curl_setopt($ch,CURLOPT_RETURNTRANSFER,0);
curl_setopt($ch,CURLOPT_COOKIEFILE,$cookie_file);
$data=curl_exec($ch);
if(empty($data)){
echo "<script>alert('false');loation.href='index.htm'</script>index.htm";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment