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

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

    Update
    25/04/2018 11:50 AM



    telegram-logo.jpg

    1.) สร้างแบบฟอร์ม สำหรับกรอกข้อมูล เพื่อส่งข้อความจากหน้าเว็บไปยัง Telegram-Notify API ตั้งชื่อไฟล์เป็น telegram-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 Telegram-Notify</title>
    <meta name="language" content="TH" >
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <center>
    <form name="Telegram-Notify" action="Telegram-Notify-api.php" method="post">
    <table width="450" border="0" cellspacing="0" cellpadding="0">
    <tr><td colspan="2" align="center"><img src="images/telegram-logo.jpg" 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>Telegram 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>
    
    

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



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

    
    <?php
    
    foreach ($_POST as $key => $value) {
     //echo "Field ".htmlspecialchars($key)." is ".htmlspecialchars($value)."<br>";
     $mesg.= "Field ".htmlspecialchars($key)." = ".htmlspecialchars($value)."\n";
    }
    
    $message=urlencode($mesg);
    
    if($message !="") {
    	
    	sendtelegrammesg();
    
    	header('Content-Type: text/html; charset=utf-8');
    	$res = notify_message($message);
    	echo "<center>ส่งข้อความเรียบร้อยแล้ว</center>";
    
    } else {
    		echo "<center>Error: กรุณากรอกข้อมูลให้ครบถ้วน</center>";
    }
    
    
    function sendtelegrammesg() {
    	
    	function notify_message($message){
    		
    		$TOKEN_KEY = "Your_Token_Key";
    		$CHATID = "Your_Chat_ID";
    	
    		$ch = curl_init();
    
    		// Disable SSL verification
    		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    
    		// Will return the response, if false it print the response
    		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
    		// Set the url
    		curl_setopt($ch, CURLOPT_URL,"https://api.telegram.org/bot$TOKEN_KEY/sendMessage?chat_id=$CHATID&text=$message");
    		
    		// Execute
    		$result = curl_exec($ch);
    
    		// Closing
    		curl_close($ch);
    
    		// แปลงข้อมูลที่รับมาในรูป json มาเป็น array จะได้ใช้ง่าย ๆ
    		//$DATA = json_decode($result, true);
    		
    		$res = json_decode($result);
    		
    		//dump ข้อมูลออกมาดู
    		//print_r($res);
    
    		return $res;
    
    	}
    
    }
    
    ?>
    
    

    3.) การออก TOKEN เพื่อใช้งาน Telegram API เปิดโปรแกรม Telegram บน PC Desktop



    4.) ค้นหาคำว่า botfather" และกด START



    5.) สร้างบอท ด้วยการพิมพ์ /newbot แล้วกด Enter



    6.) พิมพ์ชื่อ bot ตามต้องการ เช่น mybotmsg แล้วกด Enter



    7.) พิมพ์ชื่อ bot อีกครั้งโดยใส่ _bot ต่อท้ายชื่อ เช่น mybotmsg_bot แล้วกด Enter

    ท่านจะได้ Token Key ให้ Copy เก็บไว้ และเอาไปใส่ในไฟล์ telegram-notify-api.php ตรง $TOKEN_KEY = "Your_Token_Key";



    8.) คลิกที่ลิงค์ ตามที่เห็นในภาพ หรือ พิมพ์ชื่อ bot ของท่านในช่องค้นหา



    9.) กดปุ่ม START หรือพิมพ์ /start เพื่อเริ่มใช้งาน bot ของท่าน



    10.) การหาหมายเลข CHAT ID ของท่าน โดยเข้าไปที่

    https://api.telegram.org/bot$TOKENID/getUpdates <-- เปลี่ยน $TOKENID เป็น Token Key ของท่าน

    ตัวอย่าง: https://api.telegram.org/bot589577626:AAFX6ycOyrLzyrzeVYIp_YvYXNbqh0QVY3o/getUpdates


    11.) ให้ Copy ID เก็บไว้ และเอาไปใส่ในไฟล์ telegram-notify-api.php ตรง $CHATID = "Your_Chat_ID"; ตัวอย่าง $CHATID = "557508161";

    12.) ทำการทดสอบ โดยการเปิดไฟล์ telegram-notify.html กรอกรายละเอียด และ คลิกปุ่ม ส่งข้อความ



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


    คลิกเพื่อ Download ไฟล์ตัวอย่าง (เพียงแก้ไข TOKEN_KEY และ CHATID ก็สามารถใช้งานได้เลย) --> telegram-notify-contact-us.rar (Update: 25/04/2018)
    หรือ 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