CloudSponge Contact Importer for PHP

Additionally to our simple widget integration,
CloudSponge offers an API for PHP.

Get Started

Create your CloudSponge account and tell us your domain. If it’s your development environment you’ll get a CloudSponge Key for free.


Download files here:

The API consists of one main PHP file that provides an interface to API.

Other files are included to present an example of the usage of the library and API.


  • Unzip all files into a folder in your web directory.
  • Modify the contents of csconstants.php. Move this file to a central location where you will not copy over it with subsequent installs, and modify the require_once line in csimport.php to reflect this new location.
  • Point your browser at step_1_start.php in your web directory and run the sample import.


This library depends on PHP >= 5.2.0 or PECL json >= 1.2.0. If upgrading your version of PHP is not an option, consider installing the PECL json library.

Openssl and libcurl are also required. For HTTPS connections you may need to install a CA certificate bundle. A bundle has been converted for use with cURL by Haxx. Background

SSL Issues

SSL related errors are usually resolved by updating your CA certificate bundle. A certificate bundle has been converted for use with cURL by Haxx. You can read some background here.


  • csimport.php – library that interfaces with
  • step_1_start.php – Example start page that displays options to a user to import their contacts.
  • step_2_events.php – Example progress page that displays events as they become available.
  • step_3_contacts.php – Example completion page that displays the imported contacts.
  • popup.php – Example page that displays a popup to the user, to take them through the OAuth or DelAuth processes.
  • auth.php – Callback endpoint responsible for proxying WindowsLive authentication for
  • prototype.js – dependency for the sample pages to interact with the DOM.

Other languages than PHP

Don’t want to use PHP? Not a problem! CloudSponge offers API for several languages: PHP – Java – Ruby – .Net – ColdFusion – or even a Do-It-Yourself Approach, which uses a REST API to return Contacts in JSON format.

Try CloudSponge for free in your
testing environment

Get Started

Have a questions or prefer a guided tour?
Schedule a consultation with our Founder.