Sample Applications

From API Documentation

(Difference between revisions)
Jump to: navigation, search
Line 5: Line 5:
== Sample 1: mailing list signup form ==
== Sample 1: mailing list signup form ==
This application allows a site visitor to add himself or herself to a an agent's contact list, while also adding the new contact to a predefined distribution list. The application consists of two files: an HTML file containing a simple signup form, and a PHP file which processes form submissions and makes the necessary API calls.
This application allows a site visitor to add himself or herself to a an agent's contact list, while also adding the new contact to a predefined distribution list. The application consists of two files: an HTML file containing a simple signup form, and a PHP file which processes form submissions and makes the necessary API calls.
-
<source lang="html4strict">
+
<source lang="xhtml1transitional">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

Revision as of 12:41, 5 October 2012

Below are sample applications built using the API, coded using PHP. These samples demonstrate a variety of common use cases. While we do not cover every possible use of the API here, these samples are meant to be indicative of all API calls.

All examples use the cURL library for handling the HTTP request. There are other methods available in PHP (and other languages, of course), and any method that allows you to send and receive the properly formatted requests and responses is perfectly acceptable.

Sample 1: mailing list signup form

This application allows a site visitor to add himself or herself to a an agent's contact list, while also adding the new contact to a predefined distribution list. The application consists of two files: an HTML file containing a simple signup form, and a PHP file which processes form submissions and makes the necessary API calls.


GeSHi Error: GeSHi could not find the language xhtml1transitional (using path /var/api/htdocs/api/documentation/extensions/SyntaxHighlight_GeSHi/geshi/geshi/) (code 2)

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

abap, actionscript, actionscript3, ada, apache, applescript, apt_sources, asm, asp, autoit, bash, basic4gl, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, cil, cobol, cpp, cpp-qt, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gettext, glsl, gml, gnuplot, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, kixtart, klonec, klonecpp, latex, lisp, lotusformulas, lotusscript, lua, m68k, matlab, mirc, mpasm, mxml, mysql, nsis, objc, ocaml, ocaml-brief, oobas, oracle8, pascal, per, perl, php, php-brief, plsql, powershell, python, qbasic, rails, reg, robots, ruby, sas, scala, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, verilog, vhdl, visualfoxpro, winbatch, xml, xorg_conf, xpp, z80

 
Personal tools