Solved

SAASU API connect with PHP

Posted on 2014-11-27
2
267 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 108

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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 …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now