Solved

SAASU API connect with PHP

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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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 …

690 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