
Alım-satım fırsatlarını kaçırıyorsunuz:
- Ücretsiz alım-satım uygulamaları
- İşlem kopyalama için 8.000'den fazla sinyal
- Finansal piyasaları keşfetmek için ekonomik haberler
Kayıt
Giriş yap
Gizlilik ve Veri Koruma Politikasını ve MQL5.com Kullanım Şartlarını kabul edersiniz
Hesabınız yoksa, lütfen kaydolun
bence doğru parametreleri (veya hepsini) kullanmalısın
Teşekkürler!
bool HttpSendRequestW(int hRequest, string lpszHeaders, int dwHeadersLength, char &lpOptional[], int dwOptionalLength);
#define INTERNET_FLAG_RELOAD 0x80000000
#define INTERNET_FLAG_NO_CACHE_WRITE 0x04000000
#define INTERNET_FLAG_PRAGMA_NOCACHE 0x00000100
int hSession_IEType;
int hSession_Direct;
int Internet_Open_Type_Preconfig = 0;
int Internet_Open_Type_Direct = 1;
int hSession(bool Direct)
{
string InternetAgent = "Mozilla/4.0 (uyumlu; MSIE 6.0; Windows NT 5.1; Q312461)";
if (Doğrudan)
{
if (hSession_Direct == 0)
{
hSession_Direct = InternetOpenW(InternetAgent, Internet_Open_Type_Direct, "0", "0", 0);
}
dönüş(hSession_Direct);
}
başka
{
if (hSession_IEType == 0)
{
hSession_IEType = InternetOpenW(InternetAgent, Internet_Open_Type_Preconfig, "0", "0", 0);
}
dönüş(hSession_IEType);
}
}
void httpPost(dize strUrl,int bağlantı noktası,dize idxfile = "index.php"){
string headers = "Content-Type: application/x-www-form-urlencoded";
dizi verisi = "a=123";
karakter verileri[];
StringToCharArray(veri,veri);
int HttpOpen = hSession(yanlış);
int HttpConnect = InternetConnectW(HttpOpen, strUrl, bağlantı noktası, "", "", 3, 0, 0);
int HttpRequest = HttpOpenRequestW(HttpConnect, "POST", idxfile , "", "", NULL, 0, 0);
bool sonucu = HttpSendRequestW(HttpRequest, başlıklar, StringLen(başlıklar), veriler, StringLen(veriler));
uchar ch[100]; string toStr=""; int dwBytes, h=-1;
while(InternetReadFile(HttpRequest, ch, 100, dwBytes))
{
if (dwBytes<=0) kırılması; toStr=toStr+CharArrayToString(ch, 0, dwBytes);
}
int hata = GetLastError();
if(err>0)Yazdır ("Son MSDN Hatası =: ",err);
int oku[1];
Print("Bu, POST sonucu: ", sonuç);
Yazdır(toStr);
InternetCloseHandle(HttpOpen);
InternetCloseHandle(HttpRequest);
}
httpPost("www.test.com",80);
Bunu nerede çözebilirsin. çünkü istek alıp gönderebiliyorum ama sunucu boş bir dosya alıyor. jsonfile veya string göndermenin yolunu bulamıyorum