Example #1
0
     if (array_key_exists('REMOTE_HOST', $_SERVER)) {
         //&& ($_SERVER['REMOTE_HOST'] == HUB_URL_SUBSCRIBE)) {
         error_log("DEBUG: request from host: " . $_SERVER['REMOTE_HOST']);
     }
     if (array_key_exists('HTTP_USER_AGENT', $_SERVER)) {
         error_log("DEBUG: request from user_agent: " . $_SERVER['REMOTE_HOST']);
     }
     // Getting hub_challenge from hub after sending it post subscription
     if (isset($_GET["hub_challenge"])) {
         // send confirmation to the hub
         echo $_GET["hub_challenge"];
         error_log("DEBUG: received and sent back hub challenge:" . $_GET["hub_challenge"], 0);
     } elseif (isset($_POST)) {
         $post_data = file_get_contents("php://input");
         error_log("DEBUG: received POST with content: {$post_data}", 0);
         SMOBTools::get_rdf_from_rss($post_data);
     } elseif (isset($_DELETE)) {
         $post_data = file_get_contents("php://input");
         error_log("DEBUG: received DELETE with content: {$post_data}", 0);
     } elseif (isset($_PUT)) {
         $post_data = file_get_contents("php://input");
         error_log("DEBUG: received PUT with content: {$post_data}", 0);
     }
 } elseif ($t == 'private') {
     // TODO: The private profile graph is the same as the profile graph, privacy preferences will decide what is visible
     // TODO: Authorize depending on the WebID URI
     if (!SMOBAuth::check()) {
         error_log("not authenticated");
         //if($a && $a == 'edit'){
         //  header( 'Location: '.SMOB_ROOT.'auth?redirect=private/edit' ) ;
         //} else {