?
Solved

SAASU API connect with PHP

Posted on 2014-11-27
2
Medium Priority
?
310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 1500 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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

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.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

801 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