Skip to content

superogira/php---Bangkok-rain-radar-line-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php---Bangkok-rain-radar-line-notify

Installation

  1. ติดตั้ง composer
  2. git clone https://github.com/superogira/php---Bangkok-rain-radar-line-notify.git
  3. เข้าไปในโฟลเดอร์ พิมพ์ composer install
  4. สร้าง Line Notify Token
  5. แก้ไข Line Notify Token ในไฟล์ .env

Usage

<?php
  // import ไฟล์ RainRadar.php
  include './RainRadar.php';

  // สร้าง object RainRadarNotify
  $RainRadar = new RainRadarNotify()

  // ตั้งค่า path สำหรับเก็บรูป
  // Default จะเป็น  ./images/
  $RainRadar->setImagePath('./folderName/');

  // เพิ่มรูป 
  // ถ้าต้องการดึงรูปจากเรดาร์อื่น ๆ ให้ไปดู Url ของรูปจากแต่ละเรดาร์ที่นี่
  // https://weather.tmd.go.th/bma_nkm.php
  // http://weather.bangkok.go.th/radar/RadarHighResolutionNk.aspx
  $RainRadar->setImage('ลิงก์รูป1', 'ชื่อรูป2.jpg', 'ชื่อสถานที่1');
  $RainRadar->setImage('ลิงก์รูป2', 'ชื่อรูป2.jpg', 'ชื่อสถานที่2');

  // เรียกดูรายชื่อรูป
  $RainRadar->getImages();

  // สง Line Notify
  $RainRadar->sendNotify();
?>

เอาไปใช้คู่กับ Arduino ก็ได้ - ESP8266---Rain-detect-and-Notify

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors