3 ms·
foreach($seo_urls as $path){ $hash = sha256($path); exec('wget http://mywebsite.com/$path http://mywebsite.com/$path -o $project_root/seo/pages/$hash'); }
by ki_ 4y ago
foreach($seo_urls as $path){
$hash = sha256($path);
exec('wget http://mywebsite.com/$path http://mywebsite.com/$path -o $project_root/seo/pages/$hash');
}
-----
if($agent_type == 'search_engine_bot'){
$path = $request->path;
if(in_array($path, $seo_urls)){
$hash = sha256($path);
echo file_get_contents($project_root/seo/pages/$hash);
exit;
}
}
----
Would this work?
Edit: well i guess not.. because wget cant render javascript.. so.. maybe with a headless browser?