Mobile Dream Network의 일부 인터페이스를 수행하려면 다음에 ASP 버전이 사용됩니다.
다음은 참조 내용입니다. request.asp 희미한 https set https = server.createobject (msxml2.xmlhttp) '객체에 xmlhttp를 정의하십시오 https.open post, http://127.0.0.1/testpost/response.asp, false https.send <? xml 버전 = 1.0?> <misc_command 버전 = 1.6> <command_name> echo </command_name> <command_data_block> <sid> 123456 </sign> <ervice_id> 987654 </service_id> <sp_id> 11111 </sp_id> <sp_password> 22222 </sp_password> </commit_data_block> </misc_command> https.readystate = 4 인 경우 응답. 쓰기가 성공적으로 제출되었습니다 'READSTATE는 4를 성공적으로 읽습니다 희미한 objstream set objstream = server.createobject (adodb.stream) '스트림은 직접 읽기 때문에 직접 잡히기 때문에 스트림을 정의하므로 처리해야합니다. objstream.type = 1 objstream.mode = 3 objstream.open objstream.write https.responsebody objstream.position = 0 objstream.type = 2 objstream.charset = gb2312 html = objstream.readtext '코드를 돌리고 그냥 html에 넣으려면이 개체들을 닫으십시오. objstream.close objstream = 아무것도 설정하지 않습니다 HTTPS = 아무것도 설정하지 않습니다 끝 If 응답. html 응답 .asp 'domdocument 객체를 만듭니다 set xml = server.createobject (msxml2.document) xml.async = false '게시물 데이터로드 xml.load 요청 xml.parseerror.errorcode <> 0 인 경우 Response.Write는 데이터 및 설명을 올바르게받을 수 없습니다 : & XML.ParseerRor.Reason & <br> Line 끝 If set blogchild = xml.getElementsByTagName (misc_command) 'The_text = blogchild.item (0) .childnodes (1) .text 'the_text = blogchild.item (0) .text 'i = 0, blogchild.length-1의 경우 response.write the_text |
이 방법을 사용하면 ASP에서 서비스 또는 웹 서비스를 쉽게 호출 할 수 있습니다!