![]() _WinHttpReceiveResponse ( $h_openRequest ) $Data = "" Do reads data from a handle opened by the _WinHttpOpenRequest() function. $hw_open = _WinHttpOpen ( ) creates a HTTP request handle to a lokal DokuWikiStick installation on port 8800 $hw_connect = _WinHttpConnect ( $hw_open, "localhost", 8800 ) creates a HTTP request handle $h_openRequest = _WinHttpOpenRequest ( $hw_connect, "POST", "/lib/exe/xmlrpc.php", "/RPC2 HTTP/1.0", "localhost", "text/xml" ) sends the specified request to the HTTP server _WinHttpSendRequest ( $h_openRequest, "", $Xml, $XmlSize ) waits to receive the response to a HTTP request initiated by WinHttpSendRequest(). #ce - this script uses the UDF WinHttp #include "3" get the info from page 'wiki:syntax' using wiki.getPageInfo() $Xml = '' $Xml = $Xml & & '' $Xml = $Xml & & 'wiki.getPageInfo' $Xml = $Xml & & '' $Xml = $Xml & & '' $Xml = $Xml & & '' $Xml = $Xml & & 'wiki:syntax' $Xml = $Xml & & '' $Xml = $Xml & & '' $Xml = $Xml & & '' $Xml = $Xml & & '' $XmlSize = StringLen ( $Xml ) initializes the use of WinHTTP functions and returns a WinHTTP-session handle. My AutoIt3 client is mainly a proof of concept: The URL of the DW-Server must be given without the procotol ( setDebug ( 1 ) // create the XML message to send $m = new xmlrpcmsg ( 'dokuwiki.getVersion' ) // send the message and wait for response $r = $c -> send ( $m ) if ( $r = false ) die ( 'error' ) if ( ! $r -> faultCode ( ) ) ) ) ) ![]() not authorized to call method dokuwiki.getVersion it simply means that you must authenticate using the dokuwiki.login method before you can get this information. This still indicates that DW XMLRPC works perfectly. Note that you could also get a “not authorized” response. * TLSv1.2 (OUT), TLS alert, close notify (256): * upload completely sent off: 88 out of 88 bytes * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 * TLSv1.2 (IN), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS change cipher, Change cipher spec (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (IN), TLS handshake, Server finished (14): For this example I am going to implement the MetaWebLog API in C to do this we need to add two files to our project, a generic handler and a class file to handler requests to the generic. You can now create or consume an XML-RPC service. * TLSv1.2 (IN), TLS handshake, Server key exchange (12): Once extracted you will need to copy this. * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (OUT), TLS handshake, Client hello (1): * successfully set certificate verify locations: In the example below, the answer is «Release c “Greebo”». In return, you'll get the connection information and the DokuWiki version formatted as XML. Take care to adapt the URL to your own xmlrpc.php.Ĭurl -k -v -H "Content-Type: application/xml" -data-binary "dokuwiki.getVersion" Once you have a terminal app running, type the following, end the line with the return key. From linux, look for a terminal in the list of applications, then open it
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |