Eroare 406 Not Acceptable la script apelat cu Cron Job
Scris: Mie Apr 23, 2014
Buna ziua,
am codul acesta
si vreau sa il fac ca xml prin cronjobs
dar imi da eroarea 406 Not Acceptable
Nu stiu de ce nu merge.
Astept raspuns.
Multumesc aticipat.
Cu stima Trif
am codul acesta
Cod: Selectaţi tot
$sql="SELECT * FROM tabel ORDER BY denumire ASC";
$res=mysql_query($sql);
echo '<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">';
while($rand=mysql_fetch_array($res))
{
echo '<url><loc>http://site.ro/'.$rand['urlf'].'</loc><changefreq>always</changefreq></url>';
}
echo '</urlset>';
Cod: Selectaţi tot
curl http://www.site.ro/sitemap_generator.php > /home/domeniu/public_html/sitemap.xml
Nu stiu de ce nu merge.
Astept raspuns.
Multumesc aticipat.
Cu stima Trif