quoty with soap

If you're a developer and would like to use Quoty as a web service, you can access a few functions w/ the SOAP protocol.

There are three functions you can access:

function randomuserquote($username) {} function randomuserquote() {} function tagsearch($tag) {}

The basic code structure of your soap call should look like this:

// Create the client instance $client = new soapclient('http://quoty.connorboyack.com/api.php'); // Call the SOAP method // *** INSERT RESULT HERE *** // Display the result print_r($result); unset($client);

All three methods return a quote with this code structure:

<p class="quoty">Stupid is as stupid does. <span class="quotyauthor">—Forrest Gump</span></p>

function randomuserquote($username) {}

The result code (pasted above where it says "INSERT RESULT HERE") should look like this:

$result = $client->call('randomuserquote', array('username' => 'USERNAME'));

Replace 'USERNAME' with your username (or somebody else's) to retrieve a random quote saved by that user.

function randomuserquote() {}

The result code (pasted above where it says "INSERT RESULT HERE") should look like this:

$result = $client->call('randomuserquote');

Use this method to retrieve a random quote from Quoty.

function tagsearch($tag) {}

The result code (pasted above where it says "INSERT RESULT HERE") should look like this:

$result = $client->call('tagsearch', array('tag' => 'TAGNAME'));

Replace 'TAGNAME' with the name of a tag to access a random quote tagged with that word.

tag cloud

Visit the tag cloud to see a visual representation of all the tags saved in Quoty.