السلام عليكم ..
سويت برمجة للجلب من تطبيق لـXML الخاص برتب لكن للأسف يبدو أن الأخ انترنت بلس مسوي إيقاف لعملية الجلب من موقع رتب
.. لكن لو نزلت ملف daily.xml عندك على الجهاز راح تعمل معك البرمجة .. وهذه هي عملية الجلب اللي سويت ..
كود PHP:
<html dir="rtl">
<?php
$ratteb = simplexml_load_file('daily.xml');
$color = array ("#6699FF","#B3CBFF","#CADBFF");
$heading = array ("Rank","Title","Visits","Visitors");
echo "
<div align='center'>
<font face='Monotype Koufi' size='5'><b><a href='http://".$ratteb['href']."'>".$ratteb['title']."</a></b></font><br>".$ratteb['date']."<p>
<table border='0' width='100%' id='table1' dir='rtl' bordercolor='#003DF0' cellspacing='0' cellpadding='7'>
<tr>
<td style='border-bottom-style: solid; border-bottom-width: 2px' width='10%' bgcolor='$color[0]' align='center'>
<b><font face='Tahoma'>$heading[0]</font></b></td>
<td style='border-bottom-style: solid; border-bottom-width: 2px' width='50%' bgcolor='$color[0]' align='center'>
<b><font face='Tahoma'>$heading[1]</font></b></td>
<td style='border-bottom-style: solid; border-bottom-width: 2px' width='20%' bgcolor='$color[0]' align='center'>
<b><font face='Tahoma'>$heading[2]</font></b></td>
<td style='border-bottom-style: solid; border-bottom-width: 2px' width='20%' bgcolor='$color[0]' align='center'>
<b><font face='Tahoma'>$heading[3]</font></b></td>
</tr>";
foreach ($ratteb->site as $site) {
echo "
<tr>
<td style='border-bottom-style: solid; border-bottom-width: 1px' width='10%' bgcolor='$color[1]' align='center'><font face='Tahoma' size='3'><b>".$site['rank']."</b></font></td>
<td style='border-bottom-style: solid; border-bottom-width: 1px' width='50%' bgcolor='$color[2]' align='center'><font face='Tahoma' size='3'><b><a title='".$site['title']." - ".$site['url']."' target='_blank' href='".$site['url']."'>".$site['title']."</a></b></font></td>
<td style='border-bottom-style: solid; border-bottom-width: 1px' width='20%' bgcolor='$color[1]' align='center'><font face='Tahoma' size='3'><b>".$site['visits']."</b></font></td>
<td style='border-bottom-style: solid; border-bottom-width: 1px' width='20%' bgcolor='$color[2]' align='center'><font face='Tahoma' size='3'><b>".$site['visitors']."</b></font></td>
</tr>";
}
echo "
</table>
</div>
<center>Programming Bar3</center>";
?>
أما بالنسبة لموقع كلمات الموجود في رد الأخ رضا فقد جربت الجلب منه ونجحت العملية
..
وهذه هي البرمجة ..
كود PHP:
<html dir="rtl">
<?php
$rdf = simplexml_load_file('http://www.kalemat.org/rdf.php');
echo "
<div align='center'>
<table border='0' width='100%' id='table1' cellspacing='0' cellpadding='5' bordercolor='#552B00'>
<tr>
<td width='12%' bgcolor='#7D3F00' style='border-style: solid; border-width: 2px'>
<p align='center'><b><a title='".$rdf->channel->title." - ".$rdf->channel->link."' target='_blank' href='".$rdf->channel->link."'>
<font face='Monotype Koufi' color='#FFFFFF' size='2'>
".$rdf->channel->title."
</font></a></b></p>
</td>
<td width='88%'>
<p align='center'><b><font face='Tahoma' color='#552B00' size='2'>
<MARQUEE trueSpeed scrollAmount='1' scrollDelay='20' direction='right' valign='middle' onmouseover='this.stop()' onmouseout='this.start()'>
".$rdf->channel->description." :
";
foreach ($rdf->item as $item){
echo "<a title='".$item->description." | ".$item->date."' target='_blank' href='".$item->link."'>".$item->title."</a> | ";
}
echo "
</MARQUEE>
</font></b></p>
</td>
</tr>
</table>
</div>";
?>
تحياتي للجميع
عبدالعزيز