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

// Paste at the end of the file following::
/*
 *   ############################# 
 *
 *   ### Relink.us Statuscheck ###
 *
 *   #############################
 */
function ValidateRelinkUrl($url,$post_url) {
    
$url str_replace("http://relink.us/f/","",$url);
    
$url str_replace("http://www.relink.us/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.us/view.php?id=","",$url);
    
$url str_replace("http://www.relink.us/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;
}

?>