Want to use UPS APIs via PHP program.

General discussion on Zend Server for IBM System i
Post Reply
Posts: 27
Joined: Fri Jan 27, 2012 10:03 pm

Want to use UPS APIs via PHP program.

Post by ronhextall » Tue Feb 20, 2018 10:16 pm

I am running zendsvr6 and we have php running that hosts our own website.

We would like to use the API's provided by shipping company UPS to get tracking information.

I am trying use some sample code provided by UPS and I am failing. We get an error message saying 'Connection Failed'.

I contact UPS and they said: UPS has upgraded the communication security protocols for all web-based applications. Please contact your company's IT department or development team to ensure that any security protocols currently used meet the TLS 1.2 requirement.
Effective January 18, 2018, UPS will only accept TLS 1.1 and TLS 1.2 security protocols. It is highly recommended that the most current version, TLS 1.2, be implemented.

based on this article: https://zend18.zendesk.com/hc/en-us/art ... or-PHP-5-6

I ran the following command:
php-cli -r 'ini_set("display_errors", 1);file_get_contents("https://www.zend.com/");'

and did get the warning messages the article said I would get if I had the problem.

Do I proceed with the remaining steps or am I barking up the wrong tree?

Thanks for reading and any feedback.

Posts: 7
Joined: Tue Dec 01, 2015 4:03 pm

Re: Want to use UPS APIs via PHP program.

Post by step5086 » Wed Feb 21, 2018 11:22 pm

try to run on a PHP 7 server. I had similar problems using the curl functions. I setup PHP on a hosting service ( a2 hosting ) and ran my code there. The functions worked. The install of the Zend PHP 7 basic server is no charge. And you can install it on the IBM i with the existing ZENDSVR6. PHP 7 will just run on port 10090. and in subsystem ZENDPHP7.

When you get this to work I am interested to see how it works.


Post Reply