<?php
$guid = input('guid'); // Assuming input() retrieves the 'guid' parameter
$object = get_worlds_page($guid);
if (!$object) {
    echo 0;
    exit();
}

$cover = new \Ossn\Component\HelloWorld\Cover;
if ($cover->addCover($guid)) {
    echo 1;
} else {
    echo 0;
    // Optionally add error logging or debugging information
    // error_log('Failed to add cover for page with GUID: ' . $guid);
}
?>
