This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (! defined( 'ABSPATH' )) { | |
exit; | |
} | |
class WC_Request_Shipping_Quote_Method extends WC_Shipping_Method { | |
public function __construct( $instance_id = 0 ) { | |
$this->id = 'wooviet_shipping'; | |
$this->instance_id = absint( $instance_id ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file = file_get_contents('http://www.vietcombank.com.vn/ExchangeRates/'); | |
//Lấy dữ liệu | |
$pattern = '#(?<=id="ctl00_Content_ExrateView">).*(?=</table>)#imsU'; | |
preg_match($pattern, $file, $match); | |
//Tạo mảng | |
$pattern = '#<td class="code">(.*)</td><td class="code">(.*)</td><td>(.*)</td><td>(.*)</td><td>(.*)</td>.*</tr>#imsU'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Insert title here</title> | |
<style> | |
h1 { | |
color:red; | |
} | |
.content { |
NewerOlder