xml - How to accept RPC ping with PHP -


I am trying to create ping service that will accept pings like other large aggregators. I am using phpxmlrpc from

My sample code is just trying to accept ping and save all the data in the log:

  function add ( $ Xmlrpcmsg) {$ one = php_xmlrpc_decode ($ xmlrpcmsg-> getParam (0)); $ B = php_xmlrpc_decode ($ xmlrpcmsg-> getParam (1)); $ C = php_xmlrpc_decode ($ xmlrpcmsg-> getParam (2)); $ D = php_xmlrpc_decode ($ xmlrpcmsg-> getParam (3)); $ Current = file_get_contents ('test_log.txt'); $ Ww = $ one $ H. $ C $ D. '' Current $ File_put_contents ('test_log.txt', $ ww); Back true; // returning return} $ s = new xmlrpc_server (array ("example.add" => array (// XML-RPC function / method name "function" = "gt;" "add", // php function name when To use the array (array ($ xmlrpcString, $ xmlrpcString, $ xmlrpcString, $ xmlrpcString)) in GT, // and type out parameter type "docstring" with signature = & ;, "example.add" "signature" GT Is called = & 'test' // description of the method)));  

But it does not work if I ping with wordpress or any other pinger having nothing in log.

Anyone have an idea what is wrong with my code, or if you accept RPC XML ping and can suggest any other easy method to get data from it

Or maybe what data should I see sending RPC ping for the first time? Do you know how I can set up some listener who will save all the post and head data in the TXT file and analyze it. I mean to see the regular ping from WordPress and the format of that data.


Comments