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 221... | Line 222... | ||
221 | $check_sum .= $chunk; |
222 | $check_sum .= $chunk; |
222 | } |
223 | } |
223 | echo "\n"; |
224 | echo "\n"; |
224 | } |
225 | } |
225 | echo '-- Generator "generate_wellknown_other_mysql" checksum '.dechex(crc32($check_sum))."\n"; |
226 | echo '-- Generator "generate_wellknown_other_mysql" checksum '.dechex(crc32($check_sum))."\n"; |
226 | - | ||
227 | # --- |
- | |
228 | - | ||
229 | function ft_get_oid_data($oid) { |
- | |
230 | $url = OIDplus::baseConfig()->getValue('OIDINFO_API_URL') . '&oid='.urlencode($oid); |
- | |
231 | $cont_json = @file_get_contents($url); |
- | |
232 | if (!$cont_json) { |
- | |
233 | sleep(5); |
- | |
234 | $cont_json = @file_get_contents($url); |
- | |
235 | if (!$cont_json) return false; |
- | |
236 | } |
- | |
237 | $data = json_decode($cont_json,true); |
- | |
238 | - | ||
239 | return $data; |
- | |
240 | } |
- |