Created
March 23, 2019 11:23
-
-
Save hehe24h/9a1d26f430436f17d4498ff0f4c336a0 to your computer and use it in GitHub Desktop.
Ping sitemaps.js
This file contains 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
function sc_cron() { | |
var cron_files = [ 'index.php', 'script-1.php', 'script-2.php', 'neu-can-thi-them.php' ]; | |
var cron_dir = 'http://web-dat-script.net/thu-muc-chua-script/'; | |
for ( var i = 0; i < cron_files.length; i++ ) { | |
scCURL( cron_dir + cron_files[ i ] ); | |
} | |
} | |
function scCURL( url ) { | |
var result = UrlFetchApp.fetch( url ); | |
if ( result.getResponseCode() == 200 ) | |
return true; | |
else | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment