查询系统
前几天做了个大学英语四六级成绩查询系统,一个 phprpc 版本,一个 wap 版本。它们的核心代码都是相同的。下面就是从 etang.cet 获取大学英语四六级成绩的核心代码:
- function query($examid, $examtype) {
- $examid = trim($examid);
- $examtype = trim($examtype);
- if (!is_numeric($examid)) {
- return '准考证号码必须是数字';
- }
- if (strlen($examid) != 15) {
- return '准考证号码不正确';
- }
- if ($examtype == '1') {
- if ((substr($examid, 6, 4) != '0521') &&
- (substr($examid, 6, 4) != '1052')) {
- return '准考证号码与考试类型不符';
- }
- }
- if ($examtype == '2') {
- if ((substr($examid, 6, 4) != '0512') &&
- (substr($examid, 6, 4) != '0522') &&
- (substr($examid, 6, 4) != '2052')) {
- return '准考证号码与考试类型不符';
- }
- }
- $examid1 = substr($examid, 0, 6) . $examtype . '052' . substr($examid, 10, 5);
- $request = "examtype=$examtype&examid=$examid&image.x=23&image.y=32";
- $content_len = strlen($request);
- $handle = @fsockopen('cet.etang.com', 80, $errno, $errstr, 10);
- $buf = '';
- $id = base_convert(mt_rand().mt_rand(), 10, 36);
- if ($handle) {
- $http_request =
- "POST /dog/cet HTTP/1.0\r\n" .
- "Accept: */*\r\n" .
- "Referer: http://cet.etang.com/cet_girldemand_$id.htm\r\n" .
- "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Alexa Toolbar)\r\n" .
- "Host: cet.etang.com\r\n" .
- "Content-Type: application/x-www-form-urlencoded\r\n" .
- "Content-Length: $content_len\r\n" .
- "Cache-Control: no-cache\r\n" .
- "Cookie: zi=A; examid1=$examid; examtype1=$examtype; sex=girl; examid=$examid1; examtype=$examtype\r\n" .
- "\r\n" .
- $request;
- fputs($handle, $http_request, strlen($http_request));
- while (!feof($handle)) {
- $buf .= fgets($handle, 128);
- }
- fclose($handle);
- }
- else {
- return "查询服务器暂时无法连接";
- }
- $buf = explode("\r\n", $buf);
- $buf = $buf[11];
- $score = "";
- if (substr($buf, 0, 18) == 'Set-Cookie: score=') {
- $score = substr($buf, 18, strpos($buf, ';') - 18);
- }
- if (($score != '') and ($score != 'error')) {
- $score = explode(',', $score);
- }
- else {
- return '你所查询的准考证号码不存在';
- }
- return $score;
- }

Heiße KI -Werkzeuge

Undresser.AI Undress
KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover
Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool
Ausziehbilder kostenlos

Clothoff.io
KI-Kleiderentferner

AI Hentai Generator
Erstellen Sie kostenlos Ai Hentai.

Heißer Artikel

Heiße Werkzeuge

Senden Sie Studio 13.0.1
Leistungsstarke integrierte PHP-Entwicklungsumgebung

WebStorm-Mac-Version
Nützliche JavaScript-Entwicklungstools

SublimeText3 Mac-Version
Codebearbeitungssoftware auf Gottesniveau (SublimeText3)

DVWA
Damn Vulnerable Web App (DVWA) ist eine PHP/MySQL-Webanwendung, die sehr anfällig ist. Seine Hauptziele bestehen darin, Sicherheitsexperten dabei zu helfen, ihre Fähigkeiten und Tools in einem rechtlichen Umfeld zu testen, Webentwicklern dabei zu helfen, den Prozess der Sicherung von Webanwendungen besser zu verstehen, und Lehrern/Schülern dabei zu helfen, in einer Unterrichtsumgebung Webanwendungen zu lehren/lernen Sicherheit. Das Ziel von DVWA besteht darin, einige der häufigsten Web-Schwachstellen über eine einfache und unkomplizierte Benutzeroberfläche mit unterschiedlichen Schwierigkeitsgraden zu üben. Bitte beachten Sie, dass diese Software

Dreamweaver Mac
Visuelle Webentwicklungstools