Could you at least explain to me, where or how i have to define my request (such as: "http://www.mywebsite.org/myPHPFunction.php?myValue=5")?
Currently this is my definition:
Code: Select all
#define pheadbuffer "GET / HTTP/1.1\r\nUser-Agent: curl/7.37.0\r\nHost: %s\r\nAccept: */*\r\n\r\n"
#define NET_DOMAIN "http://www.mywebsite.org/myPHPFunction.php?myValue=5"
At least i got something back from the server:
Code: Select all
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<hr>
<address>Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 mod_auth_passthrough/2.1 mod_wsgi/3.3 Python/2.7.1 Server at http://www.mywebsite.org/myPHPFunction.php?myValue=5 Port 80</address>
</body></html>
Edit: What i also don't understand is, why i have to create an array with the hardcoded IP:
Code: Select all
const char esp_tcp_server_ip[4] = {X, X, X, X};
if the IP comes from the DNS:
Code: Select all
espconn_gethostbyname(&user_tcp_conn,NET_DOMAIN,&tcp_server_ip,user_dns_found);
os_memcpy(user_tcp_conn.proto.tcp->remote_ip, esp_tcp_server_ip, 4);
If i don't type the IP of the server in that array i don't get any message back, instead i get an
reconnect callback, error code -11
even though i get the message "user_dns_found [correct IP of the server]".
EDIT:
Okay, now this works:
Code: Select all
#define pheadbuffer "GET /myPHPFunction.php?myValue=5 / HTTP/1.1\r\nUser-Agent: curl/7.37.0\r\nHost: %s\r\nAccept: */*\r\n\r\n"
Finally !!
