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-68bded75123fb873457430/] or simple solution…
[crayon-68bded7512533066895679/] Output the random string with the call below: [crayon-68bded7512537776039898/]
Note: from WordPress Use it like this: [crayon-68bded7512625967379418/] Code: [crayon-68bded7512629939970424/]
[crayon-68bded7512a70430012928/] or [crayon-68bded7512a76995203742/]