Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.