อยากได้โค้ด php อันนี้ครับ http://fapturbo.com/gmt.php
มีวิธีเซฟ php ให้ติดโค้ดมาด้วยบ้างไหมครับ
หรือถ้าเขียนเองจะเขียนยังไงครับ
ส่วนข้างล่างนี้เป็นโค้ด mq4
#import "wininet.dll"
int InternetOpenA(string a0, int a1, string a2, string a3, int a4);
int InternetOpenUrlA(int a0, string a1, string a2, int a3, int a4, int a5);
int InternetReadFile(int a0, string a1, int a2, int& a3[]);
int InternetCloseHandle(int a0);
#import
int gi_1228 = 0;
string gs_1232 = "
http://fapturbo.com/gmt.php";
string gs_1240 = "AlexGmtOffset 1.0";
int gi_1248 = -1;
void start()
{
Print("GMT = "+ AutoGMTCalculation() );
return(0) ;
}
//---------------
int AutoGMTCalculation() {
string ls_0;
int li_ret_8;
int li_12;
gi_1248 = InternetOpenA(gs_1240, 0, "0", "0", 0);
string ls_16 = "XXXXXXXXXX";
if (!GetData(gs_1232, ls_16))
{
ls_0 = "Error getting data to server.";
Comment(ls_0);
Print(ls_0);
li_ret_8 = -2147483648;
} else {
li_12 = TimeCurrent() - StrToInteger(ls_16);
li_ret_8 = MathFloor((li_12 + 1800) / 3600.0);
}
InternetCloseHandle(gi_1248);
return (li_ret_8);
}
//---------------
bool GetData(string as_0, string &as_8) {
int li_16 = InternetOpenUrlA(gi_1248, as_0, "0", 0, -2080374528, 0);
if (li_16 == 0) return (FALSE);
int lia_20[] = {1};
string ls_24 = "xxxxxxxxxx";
int li_32 = InternetReadFile(li_16, ls_24, 10, lia_20);
if (li_16 != 0) InternetCloseHandle(li_16);
as_8 = ls_24;
return (TRUE);
}