
<?php
$dosya = file_get_contents("http://www.wpturk.net/a.html");
$dizi = preg_match_all("/(href=')(.*?)(')/i",$dosya,$yaz);
echo $yaz[0];
?>buradaki yanlışlık nedir sizce??
13
●1.286

<?php
$dosya = file_get_contents("http://www.wpturk.net/a.html");
$dizi = preg_match_all("/(href=')(.*?)(')/i",$dosya,$yaz);
echo $yaz[0];
?>buradaki yanlışlık nedir sizce??
<?php
$dosya = file_get_contents("http://www.wpturk.net/a.html");
preg_match_all("#<a href='(.*?)'>(.*?)</a>#i",$dosya,$yaz);
print_r($yaz[1]); //linkler
print_r($yaz[2]); //link kelimeleri
?> for($i=0;$i<count($dizi);$i++){
echo $dizi[$i]."<br />";
}yadaforeach($dizi as $key => $value){
echo $key ."=>".$value."<br />";
} foreach($dizi as $value){
echo $value."<br />";
}şeklindede kullanabilirsin
<?php
$dosya = file_get_contents("http://www.wpturk.net/soz.php");
preg_match_all("#<a href='(.*?)'>(.*?)</a>#i",$dosya,$yaz);
$say = count($yaz[1]);
echo "<b>$say</b><br>";
for($i=0; $i<=$say-1;$i++){
echo "$yaz[1][$i]<br>";
}
?>bu kod hata veriyor. aşagıda ki de yanyana sıralıyor. ben altalta sıralamak istiyorum.
<?php
$dosya = file_get_contents("http://www.wpturk.net/soz.php");
preg_match_all("#<a href='(.*?)'>(.*?)</a>#i",$dosya,$yaz);
$say = count($yaz[1]);
echo "<b>$say</b><br>";
for($i=0; $i<=$say-1;$i++){
print_r ($yaz[1][$i]);
}
?>