Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

HUYNH THANH TUNG httzipdev

🎯
Focusing
View GitHub Profile
@httzipdev
httzipdev / giaxang.php
Created Jun 27, 2018
API Chatfuel - Lấy giá xăng từ Petrolimex
View giaxang.php
<?php
/* Code by HTTZIP
* Shared on httzip.com
*/
header("Content-Type: text/plain");
$url = 'http://www.petrolimex.com.vn/';
$content = file_get_contents($url);
$first_step = explode( '<div id="vie_p6_PortletContent">' , $content );
$second_step = explode("</div>" , $first_step[1] );
View class.check.php
<?php
/* class.check.php
* Code by HTTZIP
* Share on httzip.com
*/
class Check
{
public $_token;
public $_post_id;