Good job. Simple but useful.
could you write a simle example, how to send strings via POST to a php script ?
I tried $text = $_POST["key1"];
and typed
#include <ghttp.mqh>
string params[2][2];
string response;
params[0][0] = "key1";
params[0][1] = "the_text_to_send";
and
string filenames[][];
HttpPOST("http://www.website.com", "/upload.php", params, filenames, response);
but no message has arrived the script ...
It would be very helpful ...
could you write a simle example, how to send strings via POST to a php script ?
I tried $text = $_POST["key1"];
and typed
#include <ghttp.mqh>
string params[2][2];
string response;
params[0][0] = "key1";
params[0][1] = "the_text_to_send";
and
string filenames[][];
HttpPOST("http://www.website.com", "/upload.php", params, filenames, response);
but no message has arrived the script ...
It would be very helpful ...
the first parameter is an hostname not an url, may you please try with the following ?
params[0][0] = "key1";
params[0][1] = "foobar";
string filenames[][];
string response;
HttpPOST("www.website.com", "/upload.php", params, filenames, response);
Comment(response);
could you write a simle example, how to send strings via POST to a php script ?
I tried $text = $_POST["key1"];
and typed
#include <ghttp.mqh>
string params[2][2];
string response;
params[0][0] = "key1";
params[0][1] = "the_text_to_send";
and
string filenames[][];
HttpPOST("http://www.website.com", "/upload.php", params, filenames, response);
but no message has arrived the script ...
It would be very helpful ...
the first parameter is an hostname not an url, may you please try with the following ?
params[0][0] = "key1";
params[0][1] = "foobar";
string filenames[][];
string response;
HttpPOST("www.website.com", "/upload.php", params, filenames, response);
Comment(response);
thank you for your fast answer, but this also did not help.
I tried the HttpGET function . It works, but POST not ...
I see that the functions UrlEncode and reserved_char are not beeing used ?
Is that correct. There is no reference to UrlEncode ...
I also tried active webserver and XAMPP with localhost ...
thank you for your fast answer, but this also did not help.
I tried the HttpGET function . It works, but POST not ...
I see that the functions UrlEncode and reserved_char are not beeing used ?
Is that correct. There is no reference to UrlEncode ...
I also tried active webserver and XAMPP with localhost ...
can you please post your exact code ? which version of windows are you running ?
urlencode is an auxiliary function you may use or not with your GET parameters,
put there for completeness.
i have win 7 64 bit, could that be the problem ?
yes it could be as i haven't tested this on a 64bit operating system.
to deal with this issue i have to investigate more mt4 internals (integers type)
or at least have a 64 bit machine to test this, i'll look for it.
I am getting an empty response from my http call using this library - any ideas what that might mean, at this stage i cant really understand the crux of the library itself ..
Thx :)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
"Native" MQL HTTP Client:
Author: gino pilotino