[+แจก+] ดึงข้อมูลสินค้าจาก Amazon ง่ายนิดเดียว

เริ่มโดย psuriya, 05 กันยายน 2012, 18:02:19

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

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

psuriya

วิธีใช้งาน
http://app-imtools.com/getProductByAsin?asin=B005GS3C2O <= เปลี่ยน ASIN

จะได้ข้อมูลเป็น json

เขียน php ติดต่อเพื่อจะเก็บข้อมูลลงฐานข้อมูล


function getProduct($asin) {
    $url = "http://app-imtools.com/getProductByAsin?asin=".$asin;
    $decode = json_decode(file_get_contents($url));
    if(is_object($decode)) {
        if(isset($decode->data)) {
    $product = array('title'           => $decode->data->title,
                     'product_link'    => $decode->data->product_link,
     'img_url'        => $decode->data->img_url,
     'product_desc'    => $decode->data->product_desc,
     'product_feature' => $decode->data->product_feature,
     'customer_review' => $decode->data->customer_review
    );
    var_dump($product);

    // Save To Database
        }
    }else {
        // error
        var_dump($decode);
    }
}


หวังว่าจะเป็นประโยชน์ไม่มากก็น้อยนะครับ มีปัญหาการใช้งานโพสบอกด้วยนะครับ ยินดีอำนวยความสะดวกครับ  :wanwan020:
รับพัฒนาและแก้ไขเว็บไซต์ด้วย Django

ayeweb


[direct=https://www.bitimer.in.th/]ข่าวไอที[/direct] ข่าวสารไอที แอพไอโฟน บริการอื่นๆ
[direct=https://page.line.me/gnm7628z]บริการ ตรวจหวย[/direct] อื่นๆ ทั่วไปสาระน่ารู้ ความรู้ต่างๆ
[direct=https://goo.gl/XQp91t]Host ไทย[/direct] เว็บผู้หญิงนะคะ แต่ผู้ชายก็เข้าได้ค่ะ
[direct=https://page.line.me/oer1981h]ตรวจหวย[/direct]
ตรวจหวย ผลสลากกินแบ่งรัฐบาล>>
[direct=https://goo.gl/H3JCzK]เช่าโฮสติ้ง Ruk-com[/direct]

psuriya

แวะมาจัดกันหน่อยนะครับ อาจจะช้าไปบ้างโฮสต์ราคาถูกครับ :-[
รับพัฒนาและแก้ไขเว็บไซต์ด้วย Django

zekan

แหล่งรวม[direct=http://www.siamplan.com]แบบบ้าน[/direct]ราคาประหยัด รับเขียนแบบบ้าน  และยังมี[direct=http://www.siamplan.com/index.php/freeplan]แบบบ้านฟรี[/direct]ให้เลือกดาวน์โหลดฟรีอีกมากมาย พร้อมทั้ง[direct=http://www.siamplan.com/index.php/firstfloor]แบบบ้านชั้นเดียว[/direct]อีกหลายหลังให้ท่านเลือกพิจารณา และมี [direct=https://play.google.com/store/apps/details?id=com.siamplan.freeplan]Application[/direct] แบบบ้านฟรีอีกด้วย แถมตอนนี้เรามี [direct=https://www.youtube.com/channel/UCSJhjzmwsqSVFJU8FDg-Bjg]ช่อง TV[/direct] ใน youtube เพิ่มอีก

Ferrited

คูปองลด Hostgator "gt25percentoff"
[direct=http://jigload.com]แอนดรอยด์[/direct]
อัพเดทข่าววงการไอที ตลอด 24 ชั่วโมง
ทุกเรื่องราวเกี่ยวกับ[direct=http://jigload.com]ไอโฟน[/direct][direct=http://pirun.ku.ac.th/~g5614500537]ธีมไลน์ [/direct]([direct=http://jigload.com]ซัมซุง กาแล็กซี่[/direct])และ[direct=http://jigload.com]โปรแกรมแต่งรูป[/direct])

chui761

โอ้ อันนี้กำลัง want เลย ขอบคุณมาก

ชอบตรงเก็บเข้า db ด้วย
[direct=http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=amazonnrr]เช่าโฮสเกเตอร์ Promotion ลด 50% click[/direct]|
Hostgator คูปอง Baby plan เดือนแรก 0.01$=TSBSAVE001 หลายเดือนลด 25%=TSBSAVE025 |[direct=http://www.amzhowto.com/websitemap/]สอน Clickbank Amazon CPA/Payday Viglink เช่าโฮสต์นอก จดโดเมนราคาถูก[/direct]
[direct=http://support.hostneverdie.com/aff.php?aff=156]เช่าโฮสต์ไทย hostneverdie[/direct]
[direct=http://hosterbox.com/billing/aff.php?aff=139]Hosterbox Host นอกราคาประหยัด คุณภาพดีไม่แพ้ gator[/direct]

thongdee2010

[direct=http://www.xn--q3cqmrgje0bfw5y.blogspot.com]หมอลำ[/direct]
[direct=https://esanthaiban.com] EsanthaiBan[/direct]

Affiliatetorich

อ้างถึงจาก: psuriya ใน 05 กันยายน 2012, 18:02:19
วิธีใช้งาน
http://app-imtools.com/getProductByAsin?asin=B005GS3C2O <= เปลี่ยน ASIN

จะได้ข้อมูลเป็น json

เขียน php ติดต่อเพื่อจะเก็บข้อมูลลงฐานข้อมูล


function getProduct($asin) {
    $url = "http://app-imtools.com/getProductByAsin?asin=".$asin;
    $decode = json_decode(file_get_contents($url));
    if(is_object($decode)) {
        if(isset($decode->data)) {
    $product = array('title'           => $decode->data->title,
                     'product_link'    => $decode->data->product_link,
     'img_url'        => $decode->data->img_url,
     'product_desc'    => $decode->data->product_desc,
     'product_feature' => $decode->data->product_feature,
     'customer_review' => $decode->data->customer_review
    );
    var_dump($product);

    // Save To Database
        }
    }else {
        // error
        var_dump($decode);
    }
}


หวังว่าจะเป็นประโยชน์ไม่มากก็น้อยนะครับ มีปัญหาการใช้งานโพสบอกด้วยนะครับ ยินดีอำนวยความสะดวกครับ  :wanwan020:



สวดยวด

+ รอซื้อ รอแป๊บ

psuriya

ลองใช้กันหน่อยนะครับ อยากให้เพิ่มเติมตรงไหนบอกได้นะครับ :-[
รับพัฒนาและแก้ไขเว็บไซต์ด้วย Django

Calcium


maxmail

อธิบายอีกนิดนะครับ สำหรับคนที่ไม่ใช่programmer วิธีใช้ ใช้ยังไง :wanwan011: ขอบคุณครับ

pim2528


yakuza7

ใช้ไม่เป็นเท่าไหร่ แต่ก็ขอบคุณมากครับ  :wanwan017:
[direct=https://www.konvertive.com/what-is-seo/]SEO คืออะไร สำคัญอย่างไร?[/direct] พบกับเราได้ที่ [direct=https://www.konvertive.com/]Konvertive.com[/direct]

testsoft

ฮื่อๆ อยากมีความรุ้ด้านการเขียน โปรแกรมจังเร๊ยยยยยยย  :wanwan011:
แต่ก็ ขอบคุณนะครับ น่าจะมีคนนำไปใช้ประโยชน์ได้
[direct=http://wongwienyai.co.th]เช่ารถเครน[/direct]
[direct=https://pr-area.com]ฝากข่าวประชาสัมพันธ์ฟรี!!![/direct]
[direct=http://www.sunmoon.co.th]ทัวร์ต่างประเทศ[/direct]
[direct=https://condook.com]บริการแม่บ้านทำความสะอาด[/direct]
[direct=http://www.khanpaklive.com]คันปากไลฟ์[/direct]

Queue

ใครเขียนเป็น สามารถโมต่อได้อีกเยอะ

สามารถเก็บได้ทุกส่วนที่อยู่ในหน้านั้นไม่ว่าจะเป็น instock หรือเปล่า และอีกมาก

ขอบคุณคับ