Solved

SAASU API connect with PHP

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 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

17 Experts available now in Live!

Get 1:1 Help Now