HTTP application adventure

xiaoxiao2021-03-06  64

HTTP application adventure

Date: October 3, 2004 10:56:50 >>>> Lurex Copyright Objective: 1. Successfully submit POST data to the web page, mainly to automatically log in, the function published by the article. 2. Be a dynamic dynamics similar to network reptiles to catch things from the Internet. Implementation 1: Success POST page Data Experiment 1. Fill in a single full English, then POST to the server. Form content: After two text input box title, ART, the server is saved and displayed on the page. ---- Code start ----

$ fd = fopen ("cc.txt", w); FWRITE ($ FD, $ TITLE. $ Art); fclose ($ fd);?>

- code end - ----- New project Add idHTTP, MEMO, button ---------- code start ---------- procedure tform1.button1click (sender: TOBJECT); var

Response: TStringStream; postList: TStrings; begin Response: = TStringStream.Create ( ''); postList: = TStringList.Create; try postList.Add ( 'title = myfirstwork'); postList.Add ( 'art = helloevryone'); IDHTTP1.POST ('http://192.9.200.28/index.php', postlist, response); Finally Memo1.Lines.Text: = response.datastring; response.free; postList.Free; end; ----- --- Code end -------- Results can be found: cc.txt file content changes, automatically send English forms success. (Note: When I replace the submission to Chinese, join the space, I found that the sample can be submitted, the original post content and URL parameters are different, do not have to make character conversion and replacement)

转载请注明原文地址:https://www.9cbs.com/read-110864.html

New Post(0)