cadikiz
17-12-2007, 22:58 PM
localhostunuzda yada satın aldığınız hostta bazen kullanmayı düşündüğünüz scriptlerde bazı bilgilerin olması gerektiği yazar. İşte bunu öğrenmek için hostunuza sormaya gerek yok. Aşağıdaki kodu örneğin info.php olarak kaydedin ve siteniz.com/info.php diye çağırın. Gerekli olan özellikleri buradan görebilirsiniz.
<?PHP
phpinfo();
?>
Biraz bu sayfanıza haraket katmak isterseniz aşağıdaki kodu deneyebilirsiniz.
<?php
ob_start();
phpinfo();
$phpinfo = ob_get_contents();
ob_end_clean();
preg_match_all('/#[0-9a-fA-F]{6}/', $phpinfo, $rawmatches);
for ($i = 0; $i < count($rawmatches[0]); $i++)
$matches[] = $rawmatches[0][$i];
$matches = array_unique($matches);
$hexvalue = '0123456789abcdef';
$j = 0;
foreach ($matches as $match)
{
$r = '#';
$searches[$j] = $match;
for ($i = 0; $i < 6; $i++)
$r .= substr($hexvalue, mt_rand(0, 15), 1);
$replacements[$j++] = $r;
unset($r);
}
for ($i = 0; $i < count($searches); $i++)
$phpinfo = str_replace($searches, $replacements, $phpinfo);
echo $phpinfo;
?>
<?PHP
phpinfo();
?>
Biraz bu sayfanıza haraket katmak isterseniz aşağıdaki kodu deneyebilirsiniz.
<?php
ob_start();
phpinfo();
$phpinfo = ob_get_contents();
ob_end_clean();
preg_match_all('/#[0-9a-fA-F]{6}/', $phpinfo, $rawmatches);
for ($i = 0; $i < count($rawmatches[0]); $i++)
$matches[] = $rawmatches[0][$i];
$matches = array_unique($matches);
$hexvalue = '0123456789abcdef';
$j = 0;
foreach ($matches as $match)
{
$r = '#';
$searches[$j] = $match;
for ($i = 0; $i < 6; $i++)
$r .= substr($hexvalue, mt_rand(0, 15), 1);
$replacements[$j++] = $r;
unset($r);
}
for ($i = 0; $i < count($searches); $i++)
$phpinfo = str_replace($searches, $replacements, $phpinfo);
echo $phpinfo;
?>