<?php
        
/*
         *
         *
         *    Status Script
         * 
         *
         *
        */ 
        
$post_url "http://relink.to/api/status.php";
        
$container_url "http://relink.to/f/[container_id]";
        
ValidateRelinkUrl($container_url,$post_url);

        
// Paste at the end of the file following:
        /*
         *   ############################# 
         *
         *   ### Relink.to Statuscheck ###
         *
         *   #############################
         */
        
function ValidateRelinkUrl($url,$post_url) {
            
$url str_replace("http://relink.to/f/","",$url);
            
$url str_replace("http://www.relink.to/f/","",$url);
            
$url str_replace("http://relink.us/go.php?id=","",$url);
            
$url str_replace("http://www.relink.us/go.php?id=","",$url);
            
$url str_replace("http://relink.to/view.php?id=","",$url);
            
$url str_replace("http://www.relink.to/view.php?id=","",$url);

            
// Get cURL resource
            
$curl curl_init();
            
// Set some options
            
curl_setopt_array($curl, array(
                
CURLOPT_RETURNTRANSFER => 1,
                
CURLOPT_URL => $post_url."?id=".$url."",
            ));
            
// Send the request & save response to $resp
            
$resp curl_exec($curl);
            
// Close request to clear up some resources
            
curl_close($curl);
            
            echo 
$resp;
        }

    
?>