Installation

Extract the downloaded archive and copy JavaScript and PHP files to their target directories. No further actions required.

Usage

The HTML/JavaScript part

Include jQuery and jSEND in your HTML file or template.
Loading jQuery from CDN (Content Delivery Network) is recommended.


        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"><script>
        
<script type="text/javascript" src="jsend.min.js"></script>

Write JavaScript code!


        var str = "String to Squeeze, ENcode & Deliver"; 
        
var data = $.jSEND(str);
// Send data to server

The PHP counterpart

Include jSEND class in your PHP file.


        include('jsend.class.php');
        

Write PHP code!


        $data = $_POST["data"];
        
// Checks, Validation etc.
$jSEND = new jSEND();
$str = $jSEND->getData($data);