640 [9].png

id: b26cc1b82fd041e2b1ab1bb9e0b87ea3
mime: image/png
filename: 
created_time: 2025-11-28T16:55:25.677Z
updated_time: 2025-11-30T13:34:12.254Z
user_created_time: 2025-11-28T16:55:25.677Z
user_updated_time: 2025-11-30T13:34:12.254Z
file_extension: png
encryption_cipher_text: 
encryption_applied: 0
encryption_blob_encrypted: 0
size: 39762
is_shared: 0
share_id: 
master_key_id: 
user_data: 
blob_updated_time: 1764348925677
ocr_text: // DB ES\nexport interface Env {\nDB: DiDatabase;\nexport default {\nasync fetch(request: Request, env: Env): Promise<Response> {\ntry {\nconst ip = request.headers.get(’CF-Connecting-1p") || unknown’;\nconst ipHash = await hashIP(ip);\nconst result = await env.DB.prepare(\n“INSERT INTO ip logs (ip_hash, last vist time, vist_count)\nVALUES (21, 22, 1)\nON CONFLICT(ip_hash) DO UPDATE SET\nlast_vist_time = 22,\nvist_count = vist_count + 1\nRETURNING last_vist_time, vist_count;”\n)\n-bind(ipHash, new Date().toISOstring())\n-first<{ last_vist_time: string; vist_count: number }>();
ocr_details: [{"words":[{"t":"//","bb":[18,31,8,19],"bl":[18,31,19,19]},{"t":"DB","bb":[41,55,9,18],"bl":[41,55,19,19]},{"t":"ES","bb":[64,91,6,19],"bl":[64,91,19,19]}]},{"words":[{"t":"export","bb":[17,62,28,40],"bl":[17,62,37,37]},{"t":"interface","bb":[72,139,27,37],"bl":[72,139,37,37]},{"t":"Env","bb":[149,171,28,37],"bl":[149,171,37,37]},{"t":"{","bb":[179,186,27,40],"bl":[179,186,37,37]}]},{"words":[{"t":"DB:","bb":[33,53,47,56],"bl":[33,53,56,56]},{"t":"DiDatabase;","bb":[63,146,46,58],"bl":[63,146,56,57]}]},{"words":[{"t":"export","bb":[17,62,104,116],"bl":[17,62,113,113]},{"t":"default","bb":[71,124,103,113],"bl":[71,124,113,113]},{"t":"{","bb":[133,139,103,116],"bl":[133,139,113,113]}]},{"words":[{"t":"async","bb":[33,70,125,135],"bl":[33,70,132,132]},{"t":"fetch(request:","bb":[78,184,122,135],"bl":[78,184,132,132]},{"t":"Request,","bb":[195,254,123,135],"bl":[195,254,132,132]},{"t":"env:","bb":[264,292,125,132],"bl":[264,292,132,132]},{"t":"Env):","bb":[303,338,122,135],"bl":[303,338,132,132]},{"t":"Promise<Response>","bb":[348,493,122,135],"bl":[348,493,132,132]},{"t":"{","bb":[485,496,113,142],"bl":[485,496,132,132]}]},{"words":[{"t":"try","bb":[48,70,142,154],"bl":[48,70,151,151]},{"t":"{","bb":[79,85,141,154],"bl":[79,85,151,151]}]},{"words":[{"t":"const","bb":[64,101,180,189],"bl":[64,101,189,189]},{"t":"ip","bb":[110,125,179,192],"bl":[110,125,189,189]},{"t":"=","bb":[133,140,184,187],"bl":[133,140,189,189]},{"t":"request.headers.get(’CF-Connecting-1p\")","bb":[149,447,179,192],"bl":[149,447,189,189]},{"t":"||","bb":[459,468,178,192],"bl":[459,468,189,189]},{"t":"unknown’;","bb":[482,554,179,191],"bl":[482,554,189,189]}]},{"words":[{"t":"const","bb":[64,101,199,208],"bl":[64,101,208,208]},{"t":"ipHash","bb":[110,155,198,211],"bl":[110,155,208,208]},{"t":"=","bb":[164,171,203,206],"bl":[164,171,208,208]},{"t":"await","bb":[179,216,198,208],"bl":[179,216,208,208]},{"t":"hashIP(ip);","bb":[225,308,198,211],"bl":[225,308,208,208]}]},{"words":[{"t":"const","bb":[64,101,256,265],"bl":[64,101,265,265]},{"t":"result","bb":[110,155,255,265],"bl":[110,155,265,265]},{"t":"=","bb":[164,171,260,263],"bl":[164,171,265,265]},{"t":"await","bb":[179,216,255,265],"bl":[179,216,265,265]},{"t":"env.DB.prepare(","bb":[225,339,255,268],"bl":[225,339,265,265]}]},{"words":[{"t":"“INSERT","bb":[80,132,274,284],"bl":[80,132,284,284]},{"t":"INTO","bb":[141,171,275,284],"bl":[141,171,284,284]},{"t":"ip","bb":[180,192,274,287],"bl":[180,192,284,284]},{"t":"logs","bb":[194,232,274,287],"bl":[194,232,284,284]},{"t":"(ip_hash,","bb":[242,307,274,287],"bl":[242,307,284,284]},{"t":"last","bb":[318,347,274,284],"bl":[318,347,284,284]},{"t":"vist","bb":[351,386,274,287],"bl":[351,386,284,284]},{"t":"time,","bb":[390,431,274,287],"bl":[390,431,284,284]},{"t":"vist_count)","bb":[441,524,274,287],"bl":[441,524,284,284]}]},{"words":[{"t":"VALUES","bb":[86,132,294,303],"bl":[86,132,303,303]},{"t":"(21,","bb":[142,169,293,306],"bl":[142,169,303,303]},{"t":"22,","bb":[181,200,293,305],"bl":[181,200,303,303]},{"t":"1)","bb":[210,224,293,306],"bl":[210,224,303,303]}]},{"words":[{"t":"ON","bb":[87,101,313,322],"bl":[87,101,322,322]},{"t":"CONFLICT(ip_hash)","bb":[110,239,312,325],"bl":[110,239,322,322]},{"t":"DO","bb":[249,263,313,322],"bl":[249,263,322,322]},{"t":"UPDATE","bb":[272,317,313,322],"bl":[272,317,322,322]},{"t":"SET","bb":[326,348,313,322],"bl":[326,348,322,322]}]},{"words":[{"t":"last_vist_time","bb":[103,209,331,344],"bl":[103,209,341,341]},{"t":"=","bb":[218,225,336,339],"bl":[218,225,341,341]},{"t":"22,","bb":[234,254,331,343],"bl":[234,254,341,342]}]},{"words":[{"t":"vist_count","bb":[102,178,350,363],"bl":[102,178,360,360]},{"t":"=","bb":[187,194,355,358],"bl":[187,194,360,360]},{"t":"vist_count","bb":[202,278,350,363],"bl":[202,278,360,360]},{"t":"+","bb":[287,294,353,360],"bl":[287,294,360,360]},{"t":"1","bb":[303,309,351,360],"bl":[303,309,360,360]}]},{"words":[{"t":"RETURNING","bb":[87,155,370,379],"bl":[87,155,379,379]},{"t":"last_vist_time,","bb":[164,277,369,382],"bl":[164,277,379,380]},{"t":"vist_count;”","bb":[287,376,369,382],"bl":[287,376,379,380]}]},{"words":[{"t":")","bb":[65,70,388,401],"bl":[65,70,401,401]}]},{"words":[{"t":"-bind(ipHash,","bb":[81,177,407,420],"bl":[81,177,417,417]},{"t":"new","bb":[187,209,410,417],"bl":[187,209,417,417]},{"t":"Date().toISOstring())","bb":[217,378,407,420],"bl":[217,378,417,417]}]},{"words":[{"t":"-first<{","bb":[81,139,426,439],"bl":[81,139,436,436]},{"t":"last_vist_time:","bb":[148,261,426,439],"bl":[148,261,436,436]},{"t":"string;","bb":[272,323,426,439],"bl":[272,323,436,436]},{"t":"vist_count:","bb":[333,415,426,439],"bl":[333,415,436,436]},{"t":"number","bb":[426,471,426,436],"bl":[426,471,436,436]},{"t":"}>();","bb":[480,516,426,439],"bl":[480,516,436,436]}]}]
ocr_status: 2
ocr_error: 
ocr_driver_id: 1
type_: 4