Before I list my problems, following is some additional data.
Sparkfun's data stream works perfectly fine. (with GSM, WiFi, Ethernet)
Arduino examples of Ethernet Shield, GSM shield, Wifi shield works perfectly fine.
Coming to my problem
//server=http://yourphpserver.com/add_data.php?arr=value
if (client.connect(server, 80)) {
Serial.println("-> Connected");
// Make a HTTP request:
client.print( "GET /add_data.php?");
client.print("serial=");
Considering this above code, I am not able to send any data. If i do following changes my program works and i am able to send data to my website.
if (client.connect(server, 80)) {
Serial.println("-> Connected");
// Make a HTTP request:
client.print( "GET http://yourphpserver.com/add_data.php?");
client.print("serial=");
When closing internet connection using following code. HTTP/1.1 is getting appended to my value?
e.g 25.6HTTP/1.1, 25.8HTTP/1.1, 28.9, etc.....
If i skip client.println("HTTP/1.1"); then Host is getting appended and so on.
If i use only client.stop(); then also i am not able to send any data. I don't know php so my friend is setting up for website. And he is not taking interest in troubleshooting this. Any guidance will be appreciated!
In addition to PaulS, what ethernet shield are you using? That example in the link you posted is for a ENC28J60 ethernet controller, not a W5100 IC like the official Arduino models.
SurferTim:
In addition to PaulS, what ethernet shield are you using? That example in the link you posted is for a ENC28J60 ethernet controller, not a W5100 IC like the official Arduino models.
I have used W5100, simcom900 shield, Seeedstudio WiFi shield, M10 and M95 GSM modules. All stock examples and data.sparkfun.com examples are working perfectly fine.I suspect there is problem with my php settings.
In my next post you will get my full code.
Thaks
PaulS:
The script to execute is NOT http://suyogtechnologies.com/testing.php. http is the protocol to use to talk to the server. The server has already been defined.
This is exactly my problem. GET /testing.php is not working with my my server!
But if i use "GET http://suyogtechnologies.com/testing.php?arr=" data is getting logged to my server.
but HTTP/1.1 (with and without space before H) is getting appended
PaulS:
Put a space before the HTTP/1.1 part.
missing "&" and space before http are typo errors, I have rectified them.
PaulS:
It isn't rocket science to have the php script strip that off. I don't believe that your GET request, with the http: part in it is working.
Finally thats what I have decided to do. And believe me GET request is working with full link!
So can we conclude that there is no problem with arduino but some problem with php setting on server side?
Suyog:
Finally thats what I have decided to do. And believe me GET request is working with full link!
So can we conclude that there is no problem with arduino but some problem with php setting on server side?
If that is your domain (suyogtechnologies.com), it is not working. Your site is down.
Does your ISP allow you to host a website with your current plan? If so, set up your own LAMP server. Do you have an old computer you can set up with some flavor of Linux? Your friend that does your php programming should be able to help you with that.
Does your ISP allow you to host a website with your current plan? If so, set up your own LAMP server. Do you have an old computer you can set up with some flavor of Linux? Your friend that does your php programming should be able to help you with that.
Plan just got over day before yesterday. MY ISP does allows to host server, currently i am trying to set you that. By that time i will try experimenting with my friend's website.