jeffrey Afable - 2011-08-12 06:08:31 -
In reply to message 1 from rudie dirkx
REST means Representational State Transfer. REST is the architecture used to get the value from SERVER and to Client Page.
A simple example for this,
For Server Side "server.php"
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|<?php
|$val1 = $_GET['val1'];
|$val2 = $_GET['val2'];
|print "Sum of $val1 + $val2 is ". ($val1+$val2);
|?>
For Client Side "client.php"
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|<?php
|$val1 = 2; $val2 = 5;
|$server="http://localhost/server.php?val1=$val1&val2=$val2";
|$return=file_get_contents($server);
|print $return;
|?>
The only difference are that I used Curl at my Class and Curl has more option than simple file_get_contents().