Skip to content

Instantly share code, notes, and snippets.

@gggeek
Last active December 7, 2022 10:41
Show Gist options
  • Save gggeek/b6b07a520a0b7318900fe72cd446f78c to your computer and use it in GitHub Desktop.
Save gggeek/b6b07a520a0b7318900fe72cd446f78c to your computer and use it in GitHub Desktop.
xmlrpc tests
<?php
include('../vendor/autoload.php');
$clnt = new \PhpXmlRpc\Client('https://localhost/var/srv.php');
$clnt->setAcceptedCompression(false);
$clnt->setSSLVerifyPeer(false);
$resp = $clnt->send(new \PhpXmlRpc\Request('yolo'));
var_dump($resp->errno);
var_dump($resp->errstr);
<?php
include('../vendor/autoload.php');
function yolo()
{
$retval = array(
"a" =>
"123aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa112823749817238947192873498712983489218943791823238179487129834aaa11282374981722aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb"
//"abc"
);
$encoder = new \PhpXmlRpc\Encoder();
return new \PhpXmlRpc\Response($encoder->encode($retval));
}
$signatures = [
"yolo" => array(
"function" => "yolo",
"signature" => array(array('xmlrpcstruct')),
"docstring" => "Yo",
),
];
$s = new \PhpXmlRpc\Server($signatures);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment