<?php function is_localhost() {
		$whitelist = array( '127.0.0.1', '::1' );
		if( in_array( $_SERVER['REMOTE_ADDR'], $whitelist) )
			return true;
	}
	if (!isset($thisPage) && !isset($thisUrl)) {
		$domain_name = "";
		$uri = $_SERVER["REQUEST_URI"]; 
		$exploded_uri = explode("/", $uri); 
		$domain_name = $exploded_uri[1];
		
		if ($domain_name == "web" || $domain_name == "tei") 
			$domain_name .= "/";
		else
			$domain_name = "";
	
		$thisPage = substr($_SERVER["SERVER_NAME"],strrpos($_SERVER["SERVER_NAME"],"/")+0);
		$protocol = isset($_SERVER["HTTPS"]) ? 'https' : 'http';
		$thisPage = $protocol."://".$thisPage."/".$domain_name;	
		
		$thisUrl = $_SERVER['DOCUMENT_ROOT'].'/'.$domain_name;
	}
	
	//$access_token = "5586856834.1677ed0.2acfd998c74f46c484853ce51a253996"; //"16b401baeee94e36b46adb522c0baaef";//
	//$photo_count  = 19;     
	//$user_id = "5586856834";
	//$json_link = "https://api.instagram.com/v1/users/" . $user_id . "/media/recent/?";
	//$json_link = "https://api.instagram.com/v1/users/self/media/recent/?";
	//$json_link.= "access_token={$access_token}&count={$photo_count}";
	
	//$json_link = "https://graph.facebook.com/v8.0/instagram_oembed?url=https://www.instagram.com/tradexpoid/&access_token=5586856834.1677ed0.2acfd998c74f46c484853ce51a253996";
	//echo $json_link;
	
	//echo "<br>thisPage: ".$thisPage;
	//echo "<br>thisUrl: ".$thisUrl;
	
	include_once ($thisUrl."functions/koneksi.php");
?>