This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| ini_set('display_errors', 'on'); | |
| header('Content-type: text/plain'); | |
| $token = @$_POST['token']; | |
| $cmd = @$_POST['cmd']; | |
| $fulldomain = @$_POST['fulldomain']; | |
| $value = @$_POST['value']; | |
| $split_domain = explode('.', $fulldomain); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ~/server/api/sse.ts | |
| export default defineEventHandler(async (event) => { | |
| if (!process.dev) return { disabled: true } | |
| // Enable SSE endpoint | |
| setHeader(event, 'cache-control', 'no-cache') | |
| setHeader(event, 'connection', 'keep-alive') | |
| setHeader(event, 'content-type', 'text/event-stream') | |
| setResponseStatus(event, 200) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <time :datetime="date" :title="date">{{ timeago }}</time> | |
| </template> | |
| <script> | |
| const units = [ | |
| { max: 2760000, value: 60000, name: 'minute', short: 'm', past: 'a minute ago', future: 'in a minute' }, | |
| { max: 72000000, value: 3600000, name: 'hour', short: 'h', past: 'an hour ago', future: 'in an hour' }, | |
| { max: 518400000, value: 86400000, name: 'day', short: 'd', past: 'yesterday', future: 'tomorrow' }, | |
| { max: 2419200000, value: 604800000, name: 'week', short: 'w', past: 'last week', future: 'in a week' }, |