本文整理汇总了PHP中Snoopy::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Snoopy::get方法的具体用法?PHP Snoopy::get怎么用?PHP Snoopy::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Snoopy
的用法示例。
在下文中一共展示了Snoopy::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Snoopy
return 'png';
//png
//png
case '4749':
return 'gif';
//gif
//gif
case '424d':
return 'bmp';
//bmp
//bmp
default:
return false;
}
}
}
$snoopy = new Snoopy();
$url = 'http://202.114.74.198/servlet/ProcessAddOrDelStuInLesson';
//$snoopy->cookie='JSESSIONID=0000FMlM9r4z-SHkosfvSbCewuB:-1;';
$snoopy->cookie = 'studentid=04044; JSESSIONID=0000JCRV_pl1D-dbti2nhbp3ol5:-1;';
$snoopy->referer = 'http://202.114.74.198/tch/addstu_confirm.jsp';
$post_data = array('stuNum' => 2012302660036, 'type' => 'add', 'lessonHeadId' => 20141025159, 'learnType' => urldecode('%C6%D5%CD%A8'), 'isXuanxiu' => 'true', 'Submit' => urldecode('%C8%B7%A1%A1%B6%A8'));
$snoopy->post($url, $post_data);
$rs = $snoopy->results;
//echo $rs;
$snoopy = new Snoopy();
$url = 'http://202.114.74.198/stu/newstu_index.jsp';
$snoopy->cookie = 'JSESSIONID=0000qWNUBPQXJIak1rDDZc0r2RB:-1;';
$snoopy->get($url);
$rs = $snoopy->results;
//echo $rs;
示例2: Snoopy
<?php
require_once 'snoopy.php';
if (isset($_POST['id'])) {
$snoopy = new Snoopy();
$url = 'http://210.42.121.241/servlet/Login';
$post_data = array('id' => $_POST['id'], 'pwd' => $_POST['pwd'], 'xdvfb' => $_POST['xdvfb']);
$captcha_cookie;
$handle = fopen('cookie.txt', 'r');
if ($handle) {
while (($buffer = fgets($handle, 4096)) !== false) {
$captcha_cookie = trim($buffer);
}
fclose($handle);
}
if (isset($captcha_cookie)) {
$snoopy->cookie = $captcha_cookie;
$snoopy->post($url, $post_data);
$rs = $snoopy->results;
$login_cookie = $snoopy->res_cookie;
} else {
echo 'Not Exiting captcha Cookie';
}
} else {
echo 'Not Exiting Post Data';
}
$snoopy = new Snoopy();
$snoopy->cookie = $login_cookie;
$course_url = 'http://210.42.121.241/servlet/Svlt_QueryStuLsn?action=queryStuLsn';
$snoopy->get($course_url);
$rs = $snoopy->results;
echo $rs;