{"id":2000,"date":"2024-12-31T19:07:41","date_gmt":"2024-12-31T11:07:41","guid":{"rendered":"https:\/\/www.madbull.site\/?p=2000"},"modified":"2024-12-31T19:08:42","modified_gmt":"2024-12-31T11:08:42","slug":"maxminddb%e5%9c%b0%e7%90%86%e4%bf%a1%e6%81%af%e5%ba%93-c%e8%af%ad%e8%a8%80","status":"publish","type":"post","link":"https:\/\/www.madbull.site\/?p=2000","title":{"rendered":"maxminddb\u5730\u7406\u4fe1\u606f\u5e93&#8211;C\u8bed\u8a00"},"content":{"rendered":"\n<p>maxminddb \u662f\u4e00\u4e2a IP \u7684\u5730\u7406\u4fe1\u606f\u5e93\uff0c\u53ef\u4ee5\u6839\u636e IP \u5730\u5740\u7ed9\u51fa\u5bf9\u5e94\u7684\u5730\u7406\u4f4d\u7f6e\u4fe1\u606f\u3002<\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u4e0b\u8f7d\u79bb\u7ebf\u5e93<\/strong><\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>maxminddb\u63d0\u4f9b\u5728\u7ebf\u67e5\u8be2\uff0c\u4e5f\u63d0\u4f9b\u4e86\u79bb\u7ebf\u5e93\u3002<\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u79bb\u7ebf\u5e93\u4e0b\u8f7d\u65b9\u6cd5\u53ef\u4ece\u8fd9\u4e2a\u5730\u5740\u627e\u4e00\u4e0b\uff1a<a href=\"https:\/\/support.maxmind.com\/hc\/en-us\/articles\/4408216129947-Download-and-Update-Databases\">https:\/\/support.maxmind.com\/hc\/en-us\/articles\/4408216129947-Download-and-Update-Databases<\/a><\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u4e0b\u8f7d\u9700\u8981\u6ce8\u518c\u8d26\u53f7\u5e76\u767b\u5f55\uff0c\u6ce8\u518c\u8fd8\u662f\u633a\u65b9\u4fbf\u7684\uff0c\u53ea\u9700\u8981\u6709\u4e2a\u90ae\u7bb1\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u8fd9\u91cc\u6211\u4e0b\u8f7d\u4e86\u4e24\u4e2a\u5e93\uff1aGeoLite2-Country \u548c GeoLite2-City\uff0c\u4e00\u4e2a\u7cbe\u786e\u5230\u56fd\u5bb6\u6216\u5730\u533a\uff0c\u4e00\u4e2a\u7cbe\u786e\u5230\u57ce\u5e02\u3002\u8fd9\u4e2a\u662f\u4e24\u4e2a\u538b\u7f29\u5305\uff0c\u89e3\u538b\u540e\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"252\" src=\"https:\/\/www.madbull.site\/wp-content\/uploads\/2024\/12\/\u56fe\u7247-60.png\" alt=\"\" class=\"wp-image-2002\" srcset=\"https:\/\/www.madbull.site\/wp-content\/uploads\/2024\/12\/\u56fe\u7247-60.png 320w, https:\/\/www.madbull.site\/wp-content\/uploads\/2024\/12\/\u56fe\u7247-60-300x236.png 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-large-font-size\"><strong>LIB\u5e93<\/strong><\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u5728C\u8bed\u8a00\u4e2d\u4f7f\u7528\u6b64\u79bb\u7ebf\u5e93\uff0c\u9700\u8981\u7528\u5230\u7684\u63a5\u53e3\u5728 libmaxminddb \u5e93\u4e2d\uff0c\u4ee3\u7801\u662f\u5f00\u6e90\u7684\u3002<\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u4ee3\u7801\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/maxmind\/libmaxminddb\">https:\/\/github.com\/maxmind\/libmaxminddb<\/a><\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u53ef\u4ee5\u7f16\u8bd1\u5b89\u88c5\u3002<\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u53e6\u5916\uff0c\u5927\u591a\u6570\u7cfb\u7edf\u5e93\u91cc\u4e5f\u6709 libmaxminddb \u5e93\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4ece\u7cfb\u7edf\u6e90\u91cc\u5b89\u88c5\u3002<\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"511\" height=\"123\" src=\"https:\/\/www.madbull.site\/wp-content\/uploads\/2024\/12\/\u56fe\u7247-59.png\" alt=\"\" class=\"wp-image-2001\" srcset=\"https:\/\/www.madbull.site\/wp-content\/uploads\/2024\/12\/\u56fe\u7247-59.png 511w, https:\/\/www.madbull.site\/wp-content\/uploads\/2024\/12\/\u56fe\u7247-59-300x72.png 300w\" sizes=\"auto, (max-width: 511px) 100vw, 511px\" \/><\/figure>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u4ee3\u7801<\/strong><\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u4e0a\u8ff0\u4e24\u4e2a\u6b65\u9aa4\u90fd\u5b8c\u6210\u4e86\uff0c\u5c31\u53ef\u4ee5\u5728C\u8bed\u8a00\u4e2d\u4f7f\u7528\u4e86\uff0c\u4e0b\u9762\u662f\u7ed9\u7684\u4e00\u4e2a\u793a\u4f8b\u3002<\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ test.c\n\/\/ gcc -Wall -o test test.c -lmaxminddb\n\n#include &lt;stdio.h>\n#include &lt;stdlib.h>\n#include &lt;string.h>\n\n\/\/ MaxMindDB\u7684API\u51fd\u6570\u5934\u6587\u4ef6\n#include &lt;maxminddb.h>\n\n\n\/**\n * @brief \u83b7\u53d6 MMDB_s \u53e5\u67c4\n *\n * @param db_path \u79bb\u7ebf\u4fe1\u606f\u5e93\u5730\u5740\n * @param mmdb    MMDB_s \u53e5\u67c4\n *\n * @return  0 - success  -1 - failed\n *\/\nint MMDB_init( const char *db_path, MMDB_s * mmdb ) {\n    int stat = MMDB_open(db_path, MMDB_MODE_MMAP, mmdb);\n    if (stat != MMDB_SUCCESS) {\n        printf(\"Failed to open database: %s\\n\", db_path);\n        return -1;\n    }\n    return 0 ;\n}\n\n#define COUNTRY_CODE_LEN 16\n#define PROVINCE_LEN 64\n#define CITY_LEN 64\n#define TIMEZONE_LEN 32\n#define COMPANY_LEN 256\n\n\/**\n * @brief \u4ece maxmmind \u5e93\u91cc\u83b7\u53d6\u7684 \u5730\u7406\u4f4d\u7f6e\u4fe1\u606f\n *\/\ntypedef struct GEO_info_ {\n    char country_code&#91;COUNTRY_CODE_LEN] ;\n    char province&#91;PROVINCE_LEN] ;\n    char city&#91;CITY_LEN] ;\n    char timezone&#91;TIMEZONE_LEN] ;\n    uint32_t asn_num ;\n    char company&#91;COMPANY_LEN] ;\n} GEO_info ;\n\n\n#define NA \"N\/A\"\n\n\/**\n * @brief \u7ed9\u51fa\u9ed8\u8ba4\u72b6\u6001\u7684 GEO_info \u503c\n *\n * @param geo_rslt \u9700\u8981\u88ab\u4fee\u6539\u7684\u7ed3\u6784\u6307\u9488\n *\/\nvoid set_default_geo_info(GEO_info * geo_info) {\n    strncpy( geo_info->country_code, NA, COUNTRY_CODE_LEN ) ;\n    strncpy( geo_info->province, NA, PROVINCE_LEN ) ;\n    strncpy( geo_info->city, NA, CITY_LEN ) ;\n    strncpy( geo_info->timezone, NA, TIMEZONE_LEN ) ;\n    geo_info->asn_num=0 ;\n    strncpy( geo_info->company, NA, COMPANY_LEN ) ;\n}\n\n\n\/**\n * @brief \u6253\u5370 GEO_info \u7ed3\u6784\u91cc\u7684\u6570\u636e\n *\n * @param geo\n *\/\nvoid print_geo_info( GEO_info * geo) {\n    printf(\"Geo\u4fe1\u606f:\\n\");\n    printf(\"  CountryOrRegin: &#91;%s]\\n\", geo->country_code);\n    printf(\"  Province: &#91;%s]\\n\", geo->province);\n    printf(\"  City: &#91;%s]\\n\", geo->city);\n    printf(\"  Timezone: &#91;%s]\\n\", geo->timezone);\n    printf(\"  ASN: &#91;%u]\\n\", geo->asn_num);\n    printf(\"  Company: &#91;%s]\\n\", geo->company);\n}\n\n\n\/**\n * @brief \u89e3\u6790\u5b57\u7b26\u4e32\u7c7b\u578b\u7684\u7ed3\u679c\u7ed9 GEO_info \u8d4b\u503c\n *\n * @param entry_data \u89e3\u6790\u7684\u7ed3\u679c\u6307\u9488\n * @param rslt \u7ed3\u679c\u4fdd\u5b58\u5730\u5740\n * @param rslt_len \u6700\u5927\u4f7f\u7528\u957f\u5ea6\n *\/\nvoid set_one_data_str( MMDB_entry_data_s * entry_data, char * rslt, int rslt_len ) {\n    if( entry_data->has_data &amp;&amp; entry_data->type == MMDB_DATA_TYPE_UTF8_STRING ) {\n        memcpy( rslt, entry_data->utf8_string, \n                        strlen(entry_data->utf8_string) > rslt_len-1 ? rslt_len-1 : strlen(entry_data->utf8_string) ) ;\n    } else {\n        memcpy( rslt, NA,\n                strlen(NA) >rslt_len-1 ? rslt_len-1 : strlen(NA) ) ;\n    }\n}\n\n\n\/**\n * @brief \u89e3\u6790int\u7c7b\u578b\u7684\u7ed3\u679c\u7ed9 GEO_info \u8d4b\u503c\n *\n * @param entry_data \u89e3\u6790\u7684\u7ed3\u679c\u6307\u9488\n * @param rslt \u7ed3\u679c\u4fdd\u5b58\u5730\u5740\n *\/\nvoid set_one_data_int( MMDB_entry_data_s * entry_data, uint32_t * rslt ) {\n    if( entry_data->has_data &amp;&amp; entry_data->type == MMDB_DATA_TYPE_UINT32 ) {\n        * rslt = entry_data->uint32 ;\n    } else {\n        * rslt = 0 ;\n    }\n}\n\n\/**\n * @brief \u6839\u636e IP \u5730\u5740\uff0c\u83b7\u53d6\u5730\u7406\u4f4d\u7f6e\u4fe1\u606f\n *\n * @param ip_str IP \u5730\u5740\uff0c\u5b57\u7b26\u4e32\u5f62\u5f0f\u7684\u7ed3\u6784\uff0c\u70b9\u5206\u7ed3\u6784\n * @param mmdb \u521d\u59cb\u5316\u7684\u5730\u7406\u4fe1\u606f\u67e5\u8be2\u5e93\n * @param geo_rslt \u5b58\u653e\u67e5\u8be2\u7684\u7ed3\u6784\n *\n * @return 0-success -1-failed\n *\/\nint get_location_by_ip( char * ip_str, MMDB_s * mmdb, GEO_info * geo_rslt ) {\n    if( ip_str == NULL || strlen(ip_str) == 0 || mmdb == NULL || geo_rslt == NULL ) {\n        printf(\"param error!\\n\") ;\n        return -1 ;\n    }\n        \n    int gai_error, mmdb_error ;\n    MMDB_lookup_result_s result = MMDB_lookup_string(mmdb, ip_str, &amp;gai_error, &amp;mmdb_error) ;\n    if( 0 != gai_error || MMDB_SUCCESS != mmdb_error ) {\n        printf(\"Error from MMDB_lookup_string\\n\") ;\n        set_default_geo_info(geo_rslt);\n        return -1 ;\n    }\n    MMDB_entry_data_s country_iso_code, subdivision_name, city_name, timezone, asn, organization;\n    \/\/ \u83b7\u53d6\u56fd\u5bb6\u4ee3\u7801\n    MMDB_get_value(&amp;result.entry, &amp;country_iso_code, \"country\", \"iso_code\", NULL);\n    set_one_data_str( &amp;country_iso_code, geo_rslt->country_code, sizeof(geo_rslt->country_code) ) ;\n    \/\/ \u83b7\u53d6\u7701\u4efd\uff08\u4e00\u7ea7\u884c\u653f\u533a\u5212\uff09\n    MMDB_get_value(&amp;result.entry, &amp;subdivision_name, \"most_specific_subdivision\", \"names\", \"en\", NULL);\n    MMDB_get_value(&amp;result.entry, &amp;subdivision_name, \"subdivisions\", \"0\", \"names\", \"en\", NULL);\n    set_one_data_str( &amp;subdivision_name, geo_rslt->province, sizeof(geo_rslt->province) ) ;\n    \/\/ \u83b7\u53d6\u57ce\u5e02\u540d\u79f0\n    MMDB_get_value(&amp;result.entry, &amp;city_name, \"city\", \"names\", \"en\", NULL);\n    set_one_data_str( &amp;city_name, geo_rslt->city, sizeof(geo_rslt->city) ) ;\n    \/\/ \u83b7\u53d6\u65f6\u533a\n    MMDB_get_value(&amp;result.entry, &amp;timezone, \"location\", \"time_zone\", NULL);\n    set_one_data_str( &amp;timezone, geo_rslt->timezone, sizeof(geo_rslt->timezone) ) ;\n\n    \/\/ \u83b7\u53d6 ASN \u548c\u516c\u53f8\u4fe1\u606f\n    MMDB_get_value(&amp;result.entry, &amp;asn, \"traits\", \"autonomous_system_number\", NULL);\n    set_one_data_int(&amp;asn, &amp;(geo_rslt->asn_num));\n    MMDB_get_value(&amp;result.entry, &amp;organization, \"traits\", \"organization\", NULL);\n    set_one_data_str( &amp;organization, geo_rslt->company, sizeof(geo_rslt->company) ) ;\n\n    return 0 ;\n}\n\nint main(int argc, char *argv&#91;]) {\n    \/\/ \u9009\u9879\u5904\u7406\n    if (argc != 3) {\n        printf(\"Usage: %s &lt;database_path> &lt;ip_address>\\n\", argv&#91;0]);\n        return -1;\n    }\n\n    MMDB_s mmdb ;\n    MMDB_init( argv&#91;1], &amp;mmdb ) ;\n\n    GEO_info geo_rslt ;\n    memset( &amp;geo_rslt, 0x00, sizeof(geo_rslt) ) ;\n    get_location_by_ip( argv&#91;2], &amp;mmdb, &amp;geo_rslt ) ;\n    print_geo_info( &amp;geo_rslt) ;\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-accent-3-color\">\u6ce8\u610f\uff1a\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u4f7f\u7528 MMDB_open \u83b7\u53d6\u7684\u53e5\u67c4 MMDB_s * mmdb \u4e0d\u662f\u7ebf\u7a0b\u5b89\u5168\u7684\uff0c\u5982\u679c\u5728\u5e76\u53d1\u4e2d\u4f7f\u7528\uff0c\u6ce8\u610f\u4e34\u754c\u8d44\u6e90\u62a2\u593a\u3002<\/mark><\/strong><\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u7f16\u8bd1\u6d4b\u8bd5<\/strong><\/p>\n\n\n\n<div style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"383\" src=\"https:\/\/www.madbull.site\/wp-content\/uploads\/2024\/12\/\u56fe\u7247-61.png\" alt=\"\" class=\"wp-image-2003\" srcset=\"https:\/\/www.madbull.site\/wp-content\/uploads\/2024\/12\/\u56fe\u7247-61.png 732w, https:\/\/www.madbull.site\/wp-content\/uploads\/2024\/12\/\u56fe\u7247-61-300x157.png 300w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>maxminddb \u662f\u4e00\u4e2a IP \u7684\u5730\u7406\u4fe1\u606f\u5e93\uff0c\u53ef\u4ee5\u6839\u636e IP \u5730\u5740\u7ed9\u51fa\u5bf9\u5e94\u7684\u5730\u7406\u4f4d\u7f6e\u4fe1\u606f\u3002<br \/>\n\u4e0b\u8f7d\u79bb\u7ebf\u5e93<br \/>\nmaxminddb\u63d0\u4f9b\u5728\u7ebf\u67e5\u8be2\uff0c\u4e5f\u63d0\u4f9b\u4e86\u79bb\u7ebf\u5e93\u3002<br \/>\n\u79bb\u7ebf\u5e93\u4e0b\u8f7d\u65b9\u6cd5\u53ef\u4ece\u8fd9\u4e2a\u5730\u5740\u627e\u4e00\u4e0b\uff1ahttps:\/\/support.maxmind.com\/hc\/en-us\/articles\/4408216129947-Download-and-Update-Databases<br \/>\n\u4e0b\u8f7d\u9700\u8981\u6ce8\u518c\u8d26\u53f7\u5e76\u767b\u5f55\uff0c\u6ce8\u518c\u8fd8\u662f\u633a\u65b9\u4fbf\u7684\uff0c\u53ea\u9700\u8981\u6709\u4e2a\u90ae\u7bb1\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>\u8fd9\u91cc\u6211\u4e0b\u8f7d\u4e86\u4e24\u4e2a\u5e93\uff1aGeoLite2-Country \u548c GeoLite2-City\uff0c\u4e00\u4e2a\u7cbe\u786e\u5230\u56fd\u5bb6\u6216\u5730\u533a\uff0c\u4e00\u4e2a\u7cbe\u786e\u5230\u57ce\u5e02\u3002\u8fd9\u4e2a\u662f\u4e24\u4e2a\u538b\u7f29\u5305\uff0c\u89e3\u538b\u540e\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n","protected":false},"author":1,"featured_media":559,"comment_status":"open","ping_status":"open","sticky":false,"template":"single-with-sidebar","format":"standard","meta":{"footnotes":""},"categories":[156,154],"tags":[648,649,175,647,650,646,651,652],"class_list":["post-2000","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-c","category-154","tag-city","tag-country","tag-c","tag-geoip","tag-geolite","tag-maxminddb","tag-651","tag-652"],"_links":{"self":[{"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/posts\/2000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.madbull.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2000"}],"version-history":[{"count":2,"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/posts\/2000\/revisions"}],"predecessor-version":[{"id":2005,"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/posts\/2000\/revisions\/2005"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.madbull.site\/index.php?rest_route=\/wp\/v2\/media\/559"}],"wp:attachment":[{"href":"https:\/\/www.madbull.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.madbull.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.madbull.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}