Skip to content

Instantly share code, notes, and snippets.

@hehe24h
Created March 23, 2019 11:23
Show Gist options
  • Save hehe24h/9a1d26f430436f17d4498ff0f4c336a0 to your computer and use it in GitHub Desktop.
Save hehe24h/9a1d26f430436f17d4498ff0f4c336a0 to your computer and use it in GitHub Desktop.
Ping sitemaps.js
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