是否可以插入数据自动处理action.php? [关闭]

EXAMPLE

I want to insert the data automatic everyday without press the button action or whatever.

In my case,

my data is ready to input every day on system but i must press the button action every day too.

thakyou

Handle an auto-click parameter in URL:

in URL: ?automode=1

in Javascript:

var is_automode = false,
    $btn = YOUR_BUTTON,
    $form = YOUR_FORM,
    $mode = HIDDEN_INPUT_TEXT;

location.search.replace(/^\?/,'').split('&').forEach(function(val) {
    var pair = val.split('=');
    if (pair.length && pair[0]==='automode' && pair[1]!=0) {
        is_automode = true;
    }
});

if (is_automode) {
    setInterval(function () {
        $form.target = '_blank';
        $mode.value = 'automode';    // detect this value in the target page, call window.close() if is 'automode'
        $btn.click();   // or $form.submit()
    }, 86400*1000);
}

Or add a cron job to open the URL (YOUR_URL/action.php?automode=1) without setInterval()