To get host url of current server simply replace
application\config\config.php
$config['base_url'] = '';
with
// Home URL $sysurl = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"); $sysurl .= "://" . $_SERVER['HTTP_HOST']; $sysurl .= str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']); $config['base_url'] = $sysurl;
Other than caching every hour, or every week, you may cache according to file data.…
You should first test the existence of a file by file_exists(). [crayon-692a615ba5bd9009252543/] or simple solution…
[crayon-692a615ba5d18542002760/] Output the random string with the call below: [crayon-692a615ba5d1b983720108/]
Note: from WordPress Use it like this: [crayon-692a615ba5e13733174421/] Code: [crayon-692a615ba5e16506473896/]
[crayon-692a615ba5fd6226369755/] or [crayon-692a615ba5fdb495603279/]