Got your issue .
ERROR
When I ran your code and saw the result I got
string '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>413 Request Entity Too Large</title>
</head><body>
<h1>Request Entity Too Large</h1>
The requested resource<br />/experimentation/Stack/stack.php<br />
does not allow request data with POST requests, or the amount of data provided in
the request exceeds the capacity limit.
<hr>
<address>Apache/2.2.22 (Fedora) Server at localhost Port 80</address>
</body></html>
a:2:{s:4:"test";i:1;s:7:"testing";i:2;}' (length=474)
WHY AM I GETTING THIS ERROR?
You are getting this error beacause you are using CURLOPT_POST but not sending any post data . Rather than explaining it here I will refer you to this post which is base of your issue.
RESOLUTION
CURLOPT_POST is not required since we are not posting any data .
Here is your working code
<?php
$ch = curl_init();
$curlConfig = array(
CURLOPT_URL => "http://example.com/test/curl/ping2.php",
CURLOPT_RETURNTRANSFER => true
);
curl_setopt_array($ch, $curlConfig);
$result = curl_exec($ch);
curl_close($ch);
print_r(unserialize($result)) ;
?>
$resultcontain?var_dump($result)in ping1.php and show the output.