Exemplo n.º 1
0
                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;