เป็นที่ทราบกันดีอยู่แล้วว่า aStore เราไปทำไร กับมันมากก็ไม่ได้... และแถมยังเต็มไปด้วย Domain Amazon.com แข่งกันขึ้นอันดับต้นๆ พอจะมีแววไหม ? ถ้าคิดว่ามันยากลองทางนี้ ...
1. ไปสมัคร เปิด ร้าน aStore แล้ว ปรับแต่งให้เรียบร้อย ให้มีสิค้าที่เราต้องการขายออกมา
2. จดโดเมนตาม Keyword ที่เราสามารถทำ SEO ได้ เช่น
bestbuyportablegps.com <- โดเมนี้ว่าง ใครอยากจด ก็จดเลย อิอ
3. ได้มาแล้วก็ ยัดเข้า Host ไปเลย
แล้ว.... นี่คือ file index.php
*****************************************************************************
<?php
$myshop = "http://astore.amazon.com/cheap-garmin-nuvi-255w-20";
function getTheShop($myshop) {
$url = $_SERVER['QUERY_STRING'];
$url = explode("linkurl=index.php&linkurl=",$url);
if (strpos($url[1],"&") == true) {
$url[1] = strrchr($url[1],"/");
if (strpos($url[1],"?") == true) { $url[1] = strrchr($url[1],"?"); }
else $url[1] = strchr($url[1],"&"); $url[1] = substr_replace($url[1],"?",0,1);
$shopid = explode("/",$myshop);
$url[1] = $shopid[3].$url[1]; }
else { }
if ($url[1]=="") {
$var['content'] = file_get_contents($myshop);
$var['extra'] = ' <# YOUR UNIQUE CONTENT (HTML or PLAINTEXT) #> '; }
else
$var['content'] = file_get_contents("http://astore.amazon.com/".$url[1]);
return $var;
}
function getMetaTitle($content){
$pattern = "|<[s]*title[s]*>([^<]+)<[s]*/[s]*title[s]*>|Ui";
if(preg_match($pattern, $content, $match))
return $match[1];
else
return false;
}
$content = getTheShop($myshop);
$extra = $content['extra'];
$content = preg_replace("//d{3}-d{7}-d{7}/", "", $content['content']);
// $content = $content['content'];
$tabletext = explode('alt="',$content);
for($i = 0; $i < count($tabletext); $i++) { $tabletext[$i] = substr($tabletext[$i], 0, strpos($tabletext[$i], '"')); }
$title = getMetaTitle($content);
$title = explode(" - ",$title);
$content = explode("</title>",$content);
unset($content[0]);
$content = implode("</title>",$content);
$content = str_replace('action="', ' action="http://astore.amazon.com', $content);
$content = str_replace('</title>', '', $content);
$content = str_replace('<title>', '', $content);
$content = str_replace('</body>', '', $content);
$content = str_replace('</html>', '', $content);
$content = str_replace('<body>', '', $content);
$content = str_replace('<html>', '', $content);
$tiler = substr (strrchr ($content, '<body>'), 0);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo "Buy ".$title[1]." in our Shop. ".$title[0]." - ".$title[1] ?></title>
<meta name="description" content="<?php echo "You search ".$title[0]."? Look around, we provide ".$title[0]." - ".$title[1] ?>" />
<meta name="keywords" content="<?php echo $title[1].", ".$title[0].", "; for($i = 8; $i < 18; $i++) { echo trim($tabletext[$i]).", "; } ?>" />
<meta name="robots" content="index,follow" />
<meta name="revisit-after" content="1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php echo trim($content);
echo '<br style="clear:both;" />';
echo $extra;
echo '<br style="clear:both;" />';
include "track.php";
?>
</body>
</html>
*************************************************************************
และนี่คือ File .htaccess
*************************************************************************
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !.html$
RewriteRule ^(.*)$ index.php?linkurl=$1 [qsappend,L]
************************************************************************
แค่นี้เอง astore ของเราก้จะเป็นแบบนี้ http://oeshi.net
อยากโม title, keyword, description ก็ตามสบายเลย .....
**** เก็บมาฝาก ครับ ไม่ได้ทำเอง ..
แต่เดี๋ยววันหลังจะทำ Engine ปั่น ซับโดเมนให้เปลี่ยนไปตามร้าน Astore เรา .... ipad.oeshi.net/ ==> http://astore.amazon.com/ipad-keyword-shop-20
ตอนนี้เลี้ยงลูกก่อนครับ ...
************************************************************************

2 Responses to “aStore Transformer to your Domain” Leave a reply ›
สุดยอดเลยครับ หาวิธีทำแบบนี้มานานแล้ว
ขอบคุณมากครับ
เอา include "track.php"; ออกไปก็ได้นะครับ