Skip to content

Commit

Permalink
check in first pass of php
Browse files Browse the repository at this point in the history
git-svn-id: http://arecibo.svn.beanstalkapp.com/clients/trunk@25 9fd78695-1745-4fa9-81b8-4a40a47fd399
  • Loading branch information
arecibo committed Sep 23, 2008
1 parent a7c766a commit e58cb4b
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
29 changes: 29 additions & 0 deletions php/LICENSE.txt
@@ -0,0 +1,29 @@
This library is under the BSD license:

Copyright 2008 ClearWind Consulting Ltd.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

Neither the name of the ClearWind nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Empty file added php/README.txt
Empty file.
12 changes: 12 additions & 0 deletions php/arecibo.php
@@ -0,0 +1,12 @@
<?php
function post($data) {
$url = "http://www.areciboapp.com/v/1/";
$ch = curl_init();
$data_string = http_build_query($data);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, count($data));
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
$result = curl_exec($ch);
curl_close($ch);
}
?>
7 changes: 7 additions & 0 deletions php/example.php
@@ -0,0 +1,7 @@
<?php
include("arecibo.php");
$fields = array(
"account" => "youraccount",
);
post($fields)
?>

0 comments on commit e58cb4b

Please sign in to comment.