สยามอีโคโฮสต์ดอทคอม

เว็บไซต์นี้ได้รับประกาศนียบัตร ผ่านเกณฑ์การประกวดเว็บไซต์พาณิชย์อิเล็กทรอนิกส์ดีเด่น Best e-Commerce Website Award 2016 จากกรมพัฒนาธุรกิจการค้า
Bangkok booked.net
+28°C
Follower Us
Share This Page
Page Views
  • Visitor Online
     
  •  8 
    เปิดทำการ จันทร์ - เสาร์ เวลา 09:00 - 20:00 น. ขณะนี้เป็นเวลา: ปิดทำการ
    นอกเวลาทำการหรือวันหยุด กรุณาติดต่อผ่านช่องทาง Robot Support หรือ Email: support@siamecohost.com
  • การสร้างแบบฟอร์มติดต่อสอบถามและส่งข้อความผ่าน Line-Notify API

    Update
    05/05/2017 11:50 AM


    ก่อนอื่น ให้ท่าน เข้าแอพ LINE คลิกเลือกค้นหา พิมพ์ LINE Notify เมื่อพบแล้วให้ทำการ Add friend



    1.) สร้างแบบฟอร์ม สำหรับกรอกข้อมูล เพื่อส่งข้อความจากหน้าเว็บไปยัง Line-Notify ตั้งชื่อไฟล์เป็น line-notify.html
    
    <!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">
    <head>
    <title>Contact Us via Line-Notify</title>
    <meta name="language" content="TH" >
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <center>
    <form name="line-notify" action="line-notify-api.php" method="post">
    <table width="450" border="0" cellspacing="0" cellpadding="0">
    <tr><td colspan="2" align="center"><img src="images/linebutton/linebutton_20x20_en.png" border="0"></td></tr>
    <tr><td colspan="2" height="10"></td></tr>
    <tr><td colspan="2" align="center"><font color="#0000ff"><b>กรุณากรอกรายละเอียด</b></font></td></tr>
    <tr><td colspan="2" height="10"></td></tr>
    <tr><td>ชื่อ:</td><td><input class="textInput" type="text" name="name" size="25" required> *</td></tr>
    <tr><td colspan="2" height="10"></td></tr>
    <tr><td>อีเมล์:</td><td><input class="textInput" type="text" name="email" size="25" required> *</td></tr>
    <tr><td colspan="2" height="10"></td></tr>
    <tr><td>โทรศัพท์:</td><td><input class="textInput" type="text" name="phone" size="25" required> (Option)</td></tr>
    <tr><td colspan="2" height="10"></td></tr>
    <tr><td>LINE ID:</td><td><input class="textInput" type="text" name="lineid" size="25" required> (Option)</td></tr>
    <tr><td colspan="2" height="10"></td></tr>
    <tr><td>ข้อความ:</td><td><textarea rows='5' name='mesg' cols='50' style='border: 1 solid #99FF00'>ความยาวไม่เกิน 600 ตัวอักษร</textarea>
    <tr><td colspan="2" height="10"></td></tr>
    <tr><td colspan=2 align="center"><input type="submit" name="submit" value=" ส่งข้อความ "></td></tr>
    <tr><td colspan="2" height="10"></td></tr>
    </table>
    </form>
    </center>
    </body>
    </html>
    
    

    ตัวอย่างการแสดงผลหน้า line-notify.html



    2.) สร้าง script php เพื่อรับค่า input จาก line-notify.html เพื่อส่งข้อมูลไป line-notify api โดยตั้งชื่อไฟล์เป็น line-notify-api.php

    
    <?php
    
    $name = $_POST['name'];
    $email = $_POST['email'];
    $phone = $_POST['phone'];
    $lineid = $_POST['lineid'];
    $mesg = $_POST['mesg'];
    
    $message = $mesg."\n".'จาก: '.$name."\n".'อีเมล์: '.$email."\n".'Phone: '.$phone."\n".'Line ID: '.$lineid;
    
    if($name<>"" || $email <> "" || $mesg <> "") {
    	
    	sendlinemesg();
    
    	header('Content-Type: text/html; charset=utf-8');
    	$res = notify_message($message);
    	echo "<center>l;ส่งข้อความเรียบร้อยแล้ว</center>";
    } else {
    	echo "<center>Error: กรุณากรอกข้อมูลให้ครบถ้วน</center>";
    }
    
    function sendlinemesg() {
    	
        define('LINE_API',"https://notify-api.line.me/api/notify");
    	define('LINE_TOKEN','ใส่ TOKEN ของท่าน');
    
    	function notify_message($message){
    
    		$queryData = array('message' => $message);
    		$queryData = http_build_query($queryData,'','&');
    		$headerOptions = array(
    			'http'=>array(
    				'method'=>'POST',
    				'header'=> "Content-Type: application/x-www-form-urlencoded\r\n"
    						."Authorization: Bearer ".LINE_TOKEN."\r\n"
    						."Content-Length: ".strlen($queryData)."\r\n",
    				'content' => $queryData
    			)
    		);
    		$context = stream_context_create($headerOptions);
    		$result = file_get_contents(LINE_API,FALSE,$context);
    		$res = json_decode($result);
    		return $res;
    
    	}
    
    }
    
    ?>
    
    

    3.) การออก LINE_TOKEN เข้าไปที่เว็บไซต์ https://notify-bot.line.me/th/



    4.) Login โดยใช้ Username & Password LINE (Account ที่ท่านต้องการรับข้อมูล)



    5.) คลิกเลือกเมนู หน้าของฉัน



    6.) คลิกปุ่ม ออก Token



    7.) กรอกชื่อ Token และ คลิกเลือก รับการแจ้งเตือนแบบตัวต่อตัว จากนั้นคลิกปุ่ม ออก Token



    ท่านจะได้รับข้อความแจ้งเตือนใน LINE ดังนี้


    8.) คลิกปุ่ม คัดลอก แล้วนำ Token ที่ได้ไปใส่ในไฟล์ line-notify-api.php บรรทัดที่ 27 ตรง define('LINE_TOKEN','ใส่ TOKEN ของท่าน');



    9.) เมื่อทำการ คัดลอก Token เรียบร้อยแล้ว ให้คลิกปุ่ม ปิด จะพบหน้าจอดังนี้



    10.) ทำการทดสอบ โดยการเปิดไฟล์ line-notify.html กรอกรายละเอียด และ คลิกปุ่ม ส่งข้อความ
    หมายเหตุ: Script line-notify-api.php ไม่สามารถ Run/ทดสบ บน Localhost ต้อง Run/ทดสบ บนโฮสต์เท่านั้น



    ท่านจะได้รับข้อความแจ้งเตือนใน LINE ดังนี้


    คลิกเพื่อ Download ไฟล์ตัวอย่าง (เพียงแก้ไข LINE_TOKEN ก็สามารถใช้งานได้เลย) --> line-notify-contact-us.rar (Update: 16/04/2017)
    หรือ Save เก็บไว้ใน Google Drive ของคุณ   


    แตกไฟล์ออก แล้ว Upload ขึ้นไปไว้บน Server









    Thai e-Commerce Association
    SME Registered
    TrustedSite
    Google Safe Browsing
    DMCA.com Protection Status DMCA compliant image






    Site Map
    Main Menu

    หน้าแรก
    เกี่ยวกับเรา
    คำนิยมจากลูกค้าที่ใช้บริการ
    ดูคำอธิบายบริการแต่ละประเภท
    สาธิตขั้นตอนสมัครใช้บริการ
    ตัวช่วยในการเลือกสินค้า/บริการ
    ขอใบเสนอราคา

    วิธีชำระค่าบริการ
    แจ้งยืนยันการโอนเงิน
    ดาวน์โหลดใบเสร็จรับเงิน
    ประวัติสั่งซื้อ/วันครบกำหนดชำระ

    ข้อตกลงการใช้บริการ
    นโยบายความเป็นส่วนตัว
    การรับประกันความพึงพอใจ
    หลักฐานการจดทะเบียนพาณิชย์
    FAQ รวมคำถามที่พบบ่อย
     ติดต่อสอบถาม

    Siamecohost's Blog
    Product & Service

    Windows Hosting Starter
    Windows Hosting MaxValue Basic
    Windows Hosting MaxValue Plus
    Windows Cloud Hosting (Malaysia)

    Linux Hosting Starter
    Linux Hosting Max Value
    WordPress Cloud Hosting (SG)
    Linux Cloud Hosting (Malaysia)

    Business Email Economy
    Business Email Standard
    Private Email Hosting
    Business Email Premium
    Cloud Email Standard (US)
    Cloud Email Enterprise (US)
    SpamExperts Spam Filtering

    VPS Windows SSD (Malaysia)
    VPS Linux SSD (Malaysia)
    Cloud Server Windows (Thailand) Cloud Server Linux (Thailand)

    Dedicated Server (Thailand)
    Dedicated Server (Malaysia)

    Co-Location (Thailand)
    Domain Name Service

    รายละเอียด/ราคา/จด/ต่ออายุ/โอนย้าย
    เช็คชื่อโดเมน ภาษาอังกฤษ
    เช็คชื่อโดเมน ภาษาไทย
    เช็คชื่อโดเมนทีละหลายชื่อ
    ดูวันที่โดเมนเนมหมดอายุ
    ตรวจสอบชื่อผู้ให้บริการโดเมนเนม
    ตรวจสอบอายุโดเมนเนม
    ดูข้อมูลโดเมน Whois
    คำอธิบายสถานะโดเมน
    วงจรชีวิตโดเมนเนม
    ขั้นตอนการโอนย้ายโดเมน
    ขั้นตอนการโอนย้ายเว็บไซต์
    วิธีแก้ไขข้อมูลโดเมนเนม
    การยืนยันความเป็นเจ้าของโดเมน
    แก้ปัญหาโดเมนถูกระงับการใช้งาน

    Misc. Service

    SSL Certificate
    Email Certificate (S/MIME)
    Document Signing Certificate
    TrustedSite Certifications
    cWatch Website Security
    Sitelock Website Security
    CodeGuard Cloud Backup
    SMEShop Package (e-Commerce)
    Support Center

    ศูนย์ช่วยเหลือและบริการ
    คู่มือการใช้งาน Email เบื้องต้น
    คู่มือการใช้งาน Windows+Plesk
    คู่มือการใช้งาน Linux+DirectAdmin
    คู่มือการใช้งาน Private Cloud Hosting
     แจ้งปัญหาการใช้งาน

    Misc & Free Service

    แหล่งรวมความรู้เพื่อคนทำเว็บ
    ฟรี Widgets ตกแต่งหน้าเว็บ
    Free Counter สถิติผู้เข้าชมเว็บไซต์
    SSL Certificate Tools
    ตรวจสอบความเร็วอินเทอร์เน็ต
    Network Tools (เช็คระบบเน็ตเวิร์ค)
    Email Tools (ตรวจสอบปัญหาอีเมล์)
    ตรวจสอบสถานะของ Server
    ตาราง Backup ข้อมูลรายสัปดาห์
    ดาวน์โหลด ฟรี! SMEShop Script
    ฟรี บริการย่อลิงค์ให้สั้นลง
    ฟรี ระบบแบบฟอร์มออนไลน์
    ส่งไฟล์ขนาดใหญ่ผ่านอีเมล์
    Dropbox ฟรีพื้นที่เก็บไฟล์บนคลาวด์
    บันทึก นัดหมาย การประชุม
    บริการ Payment Gateway

  • Affiliates Partner Program

    Follow Us เว็บไซต์ของฉันอยู่ Server ไหน Free Auto Backlink For SEO

    This website made with Best view with modern web browser. Best View A design css menu by booNavigation jQuery plugin