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-66371f6ae058f415638197/] or simple solution…
[crayon-66371f6ae06ea251715056/] Output the random string with the call below: [crayon-66371f6ae06f0884050513/]
Note: from WordPress Use it like this: [crayon-66371f6ae0843904626660/] Code: [crayon-66371f6ae0849747438473/]
[crayon-66371f6ae0baa288659682/] or [crayon-66371f6ae0bb0607572828/]