Subversion Repositories oidplus

Rev

Rev 1367 | Rev 1425 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1367 Rev 1416
Line 26... Line 26...
26
 */
26
 */
27
 
27
 
28
use ViaThinkSoft\OIDplus\OIDplus;
28
use ViaThinkSoft\OIDplus\OIDplus;
29
 
29
 
30
require_once __DIR__ . '/../includes/oidplus.inc.php';
30
require_once __DIR__ . '/../includes/oidplus.inc.php';
-
 
31
require_once __DIR__ . '/ft_get_oid_data.inc.php';
31
 
32
 
32
OIDplus::init(false);
33
OIDplus::init(false);
33
if (!OIDplus::baseConfig()->exists('OIDINFO_API_URL')) {
34
if (!OIDplus::baseConfig()->exists('OIDINFO_API_URL')) {
34
	die("OIDINFO_API_URL not available (API is currently not public)\n");
35
	die("OIDINFO_API_URL not available (API is currently not public)\n");
35
}
36
}
Line 227... Line 228...
227
		$check_sum .= $chunk;
228
		$check_sum .= $chunk;
228
	}
229
	}
229
	echo "\n";
230
	echo "\n";
230
}
231
}
231
echo "select '-- Generator \"generate_wellknown_other_access\" checksum ".dechex(crc32($check_sum))."';\n";
232
echo "select '-- Generator \"generate_wellknown_other_access\" checksum ".dechex(crc32($check_sum))."';\n";
232
 
-
 
233
# ---
-
 
234
 
-
 
235
function ft_get_oid_data($oid) {
-
 
236
	$url = OIDplus::baseConfig()->getValue('OIDINFO_API_URL') . '&oid='.urlencode($oid);
-
 
237
	$cont_json = @file_get_contents($url);
-
 
238
	if (!$cont_json) {
-
 
239
		sleep(5);
-
 
240
		$cont_json = @file_get_contents($url);
-
 
241
		if (!$cont_json) return false;
-
 
242
	}
-
 
243
	$data = json_decode($cont_json,true);
-
 
244
 
-
 
245
	return $data;
-
 
246
}
-