işlerimin arasında sıkıştırmaya çalıştım. Yani anlayacağınız yine aceleye geldi.
<?php
function getData ( $url )
{
if ( function_exists('curl_init') )
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if ( curl_exec($ch) === false)
{
echo "<strong>HATA:</strong> ".curl_error($ch);
die;
}
else
{
$return_data = curl_exec($ch);
}
}
else
{
if ( ! $return_data = @file_get_contents($url) )
{
echo "<strong>HATA:</strong> Siteye bağlanılamadı";
die;
}
}
return $return_data;
}
$url = "http://www.tubeincreaser.com/proxylist.txt";
$data = getData($url);
$result = explode("\n",$data);
$resultCount = count($result);
if ( $resultCount >= 10 )
{
$resultCount = 10;
}
for ( $i=0; $i<$resultCount; $i++ )
{
echo "{$result[$i]}<br />";
}
?>