Solved

SAASU API connect with PHP

Posted on 2014-11-27
2
275 Views
Last Modified: 2014-12-03
hello experts
im trying to use PHP script to connect to SAASU API
http://help.saasu.com/api/

i found online this PHP client
https://github.com/dlin-me/saasu
however when installed composer at the server In the vendor directory, there's no file named autoload.php

may be there is another way to connect to SAASU API with PHP ?

regards
0
Comment
Question by:nzrubin
2 Comments
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 40470357
I've never heard of SAASU, but it appears to be a standard RESTful API.  You can use PHP's file_get_contents() or cURL capabilities to read from the API.  You write to the API by putting various arguments into the URL.  The SAASU API interprets your request, and it responds with something (probably XML or JSON) in string form.

See: http://iconoun.com/demo/temp_nzrubin.php

This will obviously fail because I do not have the right request parameters, such as the API key, but it shows everything you need for a basic call to the API.
<?php // demo/temp_nzrubin.php
error_reporting(E_ALL);

// SEE: http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/Q_28570952.html

$api = 'https://secure.saasu.com/webservices/rest/r1/Tasks?wsaccesskey={WSAccessKey}&FileUid={FileUid}';
$xml = file_get_contents($api);
echo PHP_EOL . htmlentities($xml);

Open in new window


More on the general design of RESTful APIs is here:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_12239-Introduction-to-Application-Programming-Interfaces.html
0
 
LVL 4

Author Closing Comment

by:nzrubin
ID: 40479857
i managed just to read XML ... but SAASU API seems to be just crap ... not much info how to use at all
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question