Jump to content

php API


George Botley

Recommended Posts

It may sound a stupid question but I have no knowledge of API's using PHP.

 

Could you guys perhaps explain to me how to do it?

 

Sorry in advance.

 

Basically the script is to implement Parcel2go.com into an E-commerce solution so stores can hire shipment in one click.

 

They have provided the API but its not implemented into PHP.

Link to comment
https://forums.phpfreaks.com/topic/160345-php-api/
Share on other sites

http://www.parcel2go.com/api/

 

There is the API directory. Ideally, it would be the place order and tracking service I will implement.

 

Yours,

George

 

Hi,

 

The API referred here is a webservice. Try creating a webservice client and call the methods as described in it. Try SOAP extension in PHP.

 

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/160345-php-api/#findComment-846191
Share on other sites

Ok... That is what I mean.. lol - I don't actually know how to do that or have no knowledge of doing so. Are there any tutorials you know of?

 

Just for a basic heads up,

 

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('log_errors', '0');

// Werservice URL
$endpoint = "http://www.parcel2go.com/api/Parcel2GoApi.asmx?WSDL";

// Create SOAP Client Object
$client = new SoapClient($endpoint);

// Get all the methods from the webservice
print('<pre>');
print_r($client->__getFunctions());
print('</pre>');
?>

 

Try reading these URLs:

 

http://www.php.net/soap

http://www.herongyang.com/PHP/php_soap.html

http://www.phpbuilder.com/manual/en/function.soap-soapclient-construct.php

 

You can always do Google for lot more tutorials.

 

Hope this will help.

 

Link to comment
https://forums.phpfreaks.com/topic/160345-php-api/#findComment-846195
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.