PHP Code Sample
To perform a very simple request in PHP, your code might look like this:
| PHP 5.X
$checkurl = "http://www.webpurify.com/services/rest/?method=webpurify.live.check&api_key=[API KEY]&text=".urlencode('test test test'); | |
| PHP 4.X
function ParseXML($xml) { // Create the parser object // if we didn't get the argument then give them an error. xml_parse_into_struct($parser, trim($xml), &$structure, &$index); // the parsed array will go here. // Hack up the XML and put it into the array return $found; # $params = array( $encoded_params = array(); foreach ($params as $k => $v){ # $rsp = file_get_contents($url); # if ($ar < 1){ |
|
