$value) { $semantics[$name] = encryptString($td, $key, $value); } mcrypt_module_close($td); } $verID = rand(1,2147483647); $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php'); $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusSubscriptionURL[$id], 'string'), new xmlrpcval($title, 'string'), new xmlrpcval($author, 'string'), new xmlrpcval($url, 'string'), new xmlrpcval(serialize($semantics), 'string'), new xmlrpcval($encID, 'int'))); $resp = $client->send($msg); $val = $resp->value()->scalarVal(); if ($val == 2) { return instaDisc_sendItem($id, $title, $author, $url, $semantics, $encryptionID); } else if ($val == 0) { return TRUE; } else { return FALSE; } } function instaDisc_addSubscription($url, $enc = '') { global $instaDisc_subCount, $idusSubscriptionURL, $idusEncryptionKey; $idusSubscriptionURL[$instaDisc_subCount] = $url; $idusEncryptionKey[$instaDisc_subCount] = $enc; $instaDisc_subCount++; } function encryptString($td, $key, $string) { mcrypt_generic_init($td, $key, strrev($key)); $string = bin2hex(mcrypt_generic($td, $string)); mcrypt_generic_deinit($td); return $string; } ?>