We can use serialize() to save objects into a string, then use urlencode() to get a format suitable for the web.
PHP serialize() has the following syntax.
serialize($aVariable);
Serialize a class
<?PHP
class ComputerBook{ }
$aBook = new ComputerBook;
$safepoppy = urlencode(serialize($aBook));
?>