Rev 88 | Rev 236 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 88 | Rev 150 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | 3 | ||
4 | require_once __DIR__ . '/../includes/oidplus.inc.php'; |
4 | require_once __DIR__ . '/../includes/oidplus.inc.php'; |
5 | 5 | ||
6 | OIDplus::init(true); |
6 | OIDplus::init(true); |
7 | 7 | ||
8 | OIDplus::db()->set_charset("UTF8"); |
- | |
9 | OIDplus::db()->query("SET NAMES 'utf8'"); |
- | |
10 | - | ||
11 | # --- |
8 | # --- |
12 | 9 | ||
13 | #$cont = file_get_contents('https://oidplus.viathinksoft.com/oidplus_old/?action=list_all'); |
10 | #$cont = file_get_contents('https://oidplus.viathinksoft.com/oidplus_old/?action=list_all'); |
14 | $cont = file_get_contents(__DIR__ . '/oidplus_1_with_token.html'); |
11 | $cont = file_get_contents(__DIR__ . '/oidplus_1_with_token.html'); |
15 | 12 | ||
Line 18... | Line 15... | ||
18 | check_oid($oid); |
15 | check_oid($oid); |
19 | } |
16 | } |
20 | 17 | ||
21 | function check_oid($oid) { |
18 | function check_oid($oid) { |
22 | 19 | ||
23 | $res = OIDplus::db()->query("select * from ".OIDPLUS_TABLENAME_PREFIX."objects where id = '".OIDplus::db()->real_escape_string("oid:$oid")."'"); |
20 | $res = OIDplus::db()->query("select * from ".OIDPLUS_TABLENAME_PREFIX."objects where id = ?", array("oid:$oid")); |
24 | $ok = OIDplus::db()->num_rows($res) > 0; |
21 | $ok = OIDplus::db()->num_rows($res) > 0; |
25 | 22 | ||
26 | if (!$ok) { |
23 | if (!$ok) { |
27 | echo "Not existing: $oid\n"; |
24 | echo "Not existing: $oid\n"; |
28 | } |
25 | } |