В сторону
если топорно то
<?php $i = 1; foreach ($gVideo as $videos):?> <div id="myElement_<?=$i?>">Loading the player...</div> <script type="text/javascript"> var uVideo = '<?php echo $videos['videoId'];?>'; var uVideoImg = '<?php echo $videos['thumbnailUrl'];?>'; jwplayer("myElement_<?=$i?>").setup({ file: uVideo, image: uVideoImg, }); </script> <?php $i++; endforeach;?>
Хотя я бы пересмотрел логику.
OpenSans там по моему не грузится.
RewriteCond %{HTTP_REFERER} google [OR]
RewriteCond %{HTTP_REFERER} yahoo [OR]
RewriteCond %{HTTP_REFERER} bing
RewriteCond %{REQUEST_URI} !^/promo/
RewriteRule .* /promo/? [R,L]
При переходе с протокола https который использует гугл, реферер вроде передаваться не будет. А значит и отследить данных пользователей что с пс не возможно.
RewriteEngine On
RewriteCond %{QUERY_STRING} =param1=111¶m2=222
RewriteRule ^category.html /category.html?newparam1=111+русскиесимволы [R=301,L]
machoster точка ru/fonts/Cuprum-webfont.woff
Держи бро
$path = '.'; $keys = file('keyword.txt'); $dir = new RecursiveDirectoryIterator($path); foreach(new RecursiveIteratorIterator($dir) as $val){ if(! $val->isFile()){ continue; } $file = $val->getPathname(); $name = $val->getFilename(); $ext = explode('.', $name); $ext = end($ext); $allow = array('htm', 'html'); if(! in_array(strtolower($ext), $allow)){ continue; } $html = file_get_contents($file); $key = 'key1'; while(($p = strpos($html, $key)) !== false){ $random = trim($keys[array_rand($keys)]); $html = substr_replace($html, $random, $p, strlen($key)); } file_put_contents($file, $html); echo "{$file}<br>\n"; }
Да, переписать код под функцию например, чтобы рекурсивно обходила всю директорию.
В подпапках файлы не ищет.
$html = str_replace($key, $random, $html);
заменить на
$html = substr_replace($html, $random, $p, strlen($key));
Ну вот редирект вам написали выше;