Roxanne has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I would like to ask how to convert this PHP code to Perl (a code that can post json file to a url). I'm newbie in Perl that's I still have trouble. Also, I can't use PHP since there is no PHP installed in our Linux environment and Perl is the only available.
Below is my the php code
<?php require_once ('lib/nusoap.php'); //Give it value at parameter $param = array( 'path' => '../WebServiceSOAP/data.json'); //Create object that referer a web services $client = new nusoap_client('https://host/WebServiceSOAP/server.php'); //Call a function at server and send parameters too $response = $client->call('getData',$param); //Process result if($client->fault) { echo "FAULT: <p>Code: (".$client->faultcode."</p>"; echo "String: ".$client->faultstring; } else { print($response); } ?>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to convert PHP code to Perl?
by NetWallah (Canon) on Sep 18, 2014 at 04:53 UTC | |
|
Re: How to convert PHP code to Perl?
by Anonymous Monk on Sep 18, 2014 at 02:34 UTC |