I adjusted the push server code
if I send from command line (linux) the following:
curl --request GET 'http://localhost:51044/send?password=11116&text="message to send"'
it is working fine (the b4x server is responding)
but if I do the same from php code, it is not getting anything (server log is blank)
any idea why?
Can I add more logs to understand what happening?
on this script I am getting "0" (need to get 200 (for 200 ok)), while other pages on my apache is giving 200
if I send from command line (linux) the following:
curl --request GET 'http://localhost:51044/send?password=11116&text="message to send"'
it is working fine (the b4x server is responding)
but if I do the same from php code, it is not getting anything (server log is blank)
any idea why?
Can I add more logs to understand what happening?
on this script I am getting "0" (need to get 200 (for 200 ok)), while other pages on my apache is giving 200
B4X:
<?php
$dom_u = ""; //username
$dom_p = ""; //password
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 131072);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($ch, CURLOPT_URL, "http://127.0.0.1:51044/send?password=113306&text=%22message%20to%20send%22");
curl_setopt($ch, CURLOPT_USERPWD,$dom_u.":".$dom_p);
$data = curl_exec($ch);
$info = curl_getinfo($ch);
print_r($info["http_code"]);
curl_close($ch);
?>