Script สร้างไฟล์ Sitemap แบบลูกทุ่ง สำหรับพวกชอบปั่นตาม keyword ไฟล์*

เริ่มโดย ggynmsn, 04 สิงหาคม 2007, 02:07:31

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

ggynmsn

 :)

keywords.txt = เก็บ keyword ที่ต้องการเอามาสร้างเป็นไซด์แมบแยก keyword  ละ บันทัด

<?
$extension=".html"; /*File extension*/
$txtsitemap=fopen("sitemap.txt","w+");
fclose($txtsitemap);
$xmlsitemap=fopen("sitemap.xml","w+");
fclose($xmlsitemap);
$sitemapurl="yourdomain.com";
$sitemapurl2=$sitemapurl."index.html";
$file=file("keywords.txt");   
$counter=sizeof($file);
/*Create Text Sitemap*/
$filekeyword=fopen("keywords.txt","r");
$txtsitemap=fopen("sitemap.txt","a+");
fputs($txtsitemap,$sitemapurl2);
fputs($txtsitemap,"\r\n");
for($i=0;$i<$counter;$i++)
{
   $pagename=str_replace(" ","-",$file[$i]);
   $pagename=str_replace("%20","-",$pagename);
   $pagename=str_replace("+","-",$pagename);
   $sitemapurl1=$sitemapurl.trim($pagename).$extension;
   fputs($txtsitemap,$sitemapurl1);
   fputs($txtsitemap,"\r\n");
 
}
fclose($txtsitemap);
fclose($filekeyword);
/* Urlist Sitemap*/
$txtsitemap=fopen("urllist.txt","w+");
fclose($txtsitemap);
$file=file("keywords.txt");
$counter=sizeof($file);
/*Create Text Sitemap*/
$filekeyword=fopen("keywords.txt","r");
$txtsitemap=fopen("urllist.txt","a+");
fputs($txtsitemap,$sitemapurl2);
fputs($txtsitemap,"\r\n");
for($i=0;$i<$counter;$i++)
{
   $pagename=str_replace(" ","-",$file[$i]);
   $pagename=str_replace("%20","-",$pagename);
   $pagename=str_replace("+","-",$pagename);
   $sitemapurl1=$sitemapurl.trim($pagename).$extension;
   fputs($txtsitemap,$sitemapurl1);
   fputs($txtsitemap,"\r\n");
 
}
fclose($txtsitemap);
fclose($filekeyword);

/*Create XML Sitemap*/
$filekeyword=fopen("keywords.txt","r");
$xmlsitemap=fopen("sitemap.xml","a+");
fputs($xmlsitemap,"<?xml version='1.0' encoding='UTF-8'?>");
fputs($xmlsitemap,"\r\n");
fputs($xmlsitemap,"<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>");
fputs($xmlsitemap,"\r\n");
fputs($xmlsitemap,"<url>");
fputs($xmlsitemap,"\r\n");
fputs($xmlsitemap,"<loc>");
fputs($xmlsitemap,$sitemapurl2);
fputs($xmlsitemap,"</loc>");
fputs($xmlsitemap,"\r\n");
fputs($xmlsitemap,"<priority>1.0</priority>");
fputs($xmlsitemap,"\r\n");
fputs($xmlsitemap,"<changefreq>hourly</changefreq>");
fputs($xmlsitemap,"</url>");
fputs($xmlsitemap,"\r\n");
for($i=0;$i<$counter;$i++)
{
   $pagename=str_replace(" ","-",$file[$i]);
   $pagename=str_replace("%20","-",$pagename);
   $pagename=str_replace("+","-",$pagename);
   $sitemapurl1=$sitemapurl.trim($pagename).$extension;
   fputs($xmlsitemap,"<url>");
   fputs($xmlsitemap,"\r\n");
   fputs($xmlsitemap,"<loc>");
   fputs($xmlsitemap,$sitemapurl1);
   fputs($xmlsitemap,"</loc>");
   fputs($xmlsitemap,"\r\n");
   fputs($xmlsitemap,"<priority>1.0</priority>");
   fputs($xmlsitemap,"\r\n");
   fputs($xmlsitemap,"<changefreq>hourly</changefreq>");
   fputs($xmlsitemap,"</url>");
   fputs($xmlsitemap,"\r\n");
 
}
fputs($xmlsitemap,"</urlset>");
fclose($xmlsitemap);
fclose($filekeyword);
echo "<center><b>Text Sitemap sitemap.txt Create Successfully<br>";
echo "XML Sitemap sitemap.xml Create Successfully</b></center>";
?>


ColdMoney

[direct=https://www.jumnong.com]รับจำนอง[/direct] [direct=https://burapasup.com]รับซื้อบ้าน[/direct] [direct=https://kadsan.com]สินค้าราคาถูก[/direct] [direct=https://checkcheap.com]เปรียบเทียบราคา[/direct]

L



น้องบิ้ว


tarawat



เกรียนเทพ

เพิ่งเห็น ๆ

เเทงยูหลาย ๆ ที

ปล. ผมไม่ได้ขุด เร้บบนขุด

:D


เกรียนเทพ

อ้างถึงจาก: bugmai ใน 23 เมษายน 2008, 17:04:03
เอาเป็นว่าขุดมาแล้ว มันใช้ยังไงครับ  :'( :'(

จับยัดไส่ Notepad เเล้ว Save As มาเป็นไฟร์ .php เเล้วอัพขึ้นโฮส เเล้วก็สั่งรันตามชื่อไฟร์

ImIlluSion

จะแยกแยะถูกผิดนั้น  ช่างยากนัก
เพราะมันปนกันมั่วอยู่ในตัวมนุษย์  จนหมดแล้ว


vadon

แบบนี้ต้องลอง ขอบคุงงับ


[/url=http://www.hiphopdanceremix.com]Free Music Download[/url]
[/url=http://www.zatanlord.com]Album Sexy[/url]


golfer007

อ้างถึงจาก: manteeen ใน 06 มิถุนายน 2008, 18:11:15
มันใช้ไงครับ  :o

อ่านบ้างมั้ยเนี่ย

อ้างถึงจาก: เกรียนเทพ ใน 23 เมษายน 2008, 17:06:31
อ้างถึงจาก: bugmai ใน 23 เมษายน 2008, 17:04:03
เอาเป็นว่าขุดมาแล้ว มันใช้ยังไงครับ  :'( :'(

จับยัดไส่ Notepad เเล้ว Save As มาเป็นไฟร์ .php เเล้วอัพขึ้นโฮส เเล้วก็สั่งรันตามชื่อไฟร์

etgsgroup

เกือบพลาดขอบคุณครับทีุ่ขุดมา ไม่งั้นไม่ได้เหมือนกัน  :'(
ขอบคุณ ThaiSeoBoard สำหรับความรู้ทั้งทางด้าน SEO, SEM, Affiliate ตั้งแต่สมัยที่คนไทยไม่มีความรู้เกี่ยวกับ Digital Marketing เลย ต้องอ่านจาก ต่างประเทศอย่างเดียว

Finish

ทำไมผมใช้แล้วมันเป็นแบบนี้
Warning: fopen(sitemap.txt) [function.fopen]: failed to open stream: Permission denied in D:\xxxxxxxx\httpdocs\SiteMap.php on line 3

Warning: fclose(): supplied argument is not a valid stream resource in D:\xxxxxxxx\httpdocs\SiteMap.php on line 4

Warning: file(keywords.txt) [function.file]: failed to open stream: No such file or directory in D:\xxxxxxxx\httpdocs\SiteMap.php on line 9
.
.
.
.

หรือผมใช้ไม่เป็นเนี่ย... ???
🚨 อย่ารอให้ข้อมูลหาย... แล้วค่อยเริ่ม Backup! 🚨
🚀 ป้องกัน Ransomware อัตโนมัติด้วย Easy Auto Backup
(ตั้งครั้งเดียวทำงานเอง / ทดลองฟรี)

💻 คอมพัง จอฟ้า เปิดไม่ติด? เรียก ร้านซ่อมคอมพิวเตอร์ใกล้ฉัน

📍 บริการถึงบ้าน/ออนไลน์: สายไหม บางเขน ดอนเมือง ลำลูกกา

doktup

me เสร็จแล้วขึ้นแบบนี้

จะเอาไปบอก google ยังงัยคับ ? งง ?


surin108.comindex.php
surin108.comสุรินทร์.html
surin108.comจังหวัดสุรินทร์.html
surin108.comข่าวสุรินทร์.html
surin108.comงานช้าง.html
surin108.comช้างไทย.html
surin108.comช้างสุรินทร์.html
surin108.comโรงแรมในสุรินทร์.html
surin108.comท่องเที่ยวสุรินทร์.html
surin108.comเที่ยวสุรินทร์.html
surin108.comที่พัก.html
surin108.comห้วยเสนง.html
surin108.comตาเมือนธม.html
surin108.comปราสาทขอม.html
surin108.comเขาสวาย.html
surin108.comพนมสวาย.html
surin108.comทองทารินทร์.html
surin108.comเพชรเกษม.html
[direct=http://www.surin108.com]จังหวัดสุรินทร์[/direct] | [direct=http://www.surin108.com/web/]ข่าวสุรินทร์[/direct]

KAI

อ้างถึงจาก: vadon ใน 06 มิถุนายน 2008, 17:20:30
แบบนี้ต้องลอง ขอบคุงงับ


[/url=http://www.hiphopdanceremix.com]Free Music Download[/url]
[/url=http://www.zatanlord.com]Album Sexy[/url]

เนียนวางลิงค์

ป.ล.กระทู้นี้ขุดมาจาก ปีก่อน เดี๋ยวรอผู้รู้ php มาแนะนำละกันครับ
[direct=http://i-kai.com/]ทำ seo[/direct] WOODY รับประกันอันดับ Top 10 เริ่มเดือนละ 1500 by [direct=http://i-kai.com]ทำ seo[/direct] โดย woody