Sending data from PC to PHP webpage without Ethernet shield?

Hello i was wondering if this is a programming question or hardware not sure is why i posted here. But is it possible to send data from the arduino to a PHP webpage with MYSQL to store data without having to use a Ethernet shield? I suppose this question is been asked before but not sure is why I'm asking now.

Presumably you could send it over the USB cable ?

...R

Hello Robin2 yes sorry i forgot over USB you are correct i forgot to say that as well.

I have no recent experience of PHP but I have a few Python programs that communicate with an Arduino and display the data on a web-page.

In my Python code I run a background Thread that keeps listening for data from the Arduino. The main Python code can then retrieve the data if any is available. The background Thread could also write data to the database.

...R

How about:

  • build up the URL (or only the parameter parts) in the Arduino
  • send it as a single line via serial
  • have it executed (completed) via a small Python marshalling script
    The parts of the response you want/need to pass back to the Arduino could likewise be represented by a single line.

PHP and MySQL are running on the server side, so that does not add any complexity apart URL syntax.

Whandall:

  • have it executed (completed) via a small Python marshalling script

I don't know, but I assume that could be done with PHP code.

...R

@Robin2:

The PHP is running on the web server, I doubt it will be is pc the Arduino is connected to,
because then there would be no need to use 'a Ethernet shield'.

The marshalling can be done in any language.

Whandall:
The marshalling can be done in any language.

I do understand that.

I had assumed the Arduino is connected by USB to the server PC and hence my suggestion just to extend the PHP code to take in the data from the Arduino.

...R

Hello all thanks for the reply. I all ready have the php and mysql part of it and working the problem I'm having is How do i get my arduino to interface with my computer to grab the information from the webpage it's self from the internet i mean.

josephchrzempiec:
Hello all thanks for the reply. I all ready have the php and mysql part of it and working the problem I'm having is How do i get my arduino to interface with my computer to grab the information from the webpage it's self from the internet i mean.

There have been various suggestions and question in the Replies you have already received - but you have not commented on them so it looks like you did not read them.

...R

I'm actually readying it. The thing is i don't want to go from the arduino to the php webpage. But the other way around to go from the php webpage to the arduino and display and store the information.

josephchrzempiec:
But is it possible to send data from the arduino to a PHP webpage with MYSQL to store data without having to use a Ethernet shield?

josephchrzempiec:
The thing is i don't want to go from the arduino to the php webpage.
But the other way around to go from the php webpage to the arduino and display and store the information.

And you let us find a way in the other direction was occupational therapy?

Huh what do you mean occupational therapy? I was trying to figure out how to do it is why I'm asking in here. If it is possible and how would i go about that i didn't know if it is a software thing or hardware I'm missing or what I'm needing to start something like this is why I'm asking in here i never ask anyone to do my work for me. Trying to get some advice on how i should start or look into something like this. If i wanted occupational therapy i go see a shrink or a back doctor which i do 2 times a week.

All i wanted to do is send a data from the webpage to the arduino with lcd Without having to use a Ethernet shield that is why. It is why I'm asking how would i go about this. So if I'm confusing I'm sorry about that part.

Then you have to run a server/demon/receiver on the pc, have that triggered from your website
(firewalls/routers/company policies will make that from not trivial to very hard)
and contact the Ardunio via serial.

A 'little bit' more complex, but not on the Ardunio side.

josephchrzempiec:
The thing is i don't want to go from the arduino to the php webpage. But the other way around to go from the php webpage to the arduino and display and store the information.

That is not what you said in your Original Post

is it possible to send data from the arduino to a PHP webpage

Sending data to the Arduino should be easier. As far as I know you can communicate over a serial port with PHP.

You still have not said if your Arduino is connected to the PC that hosts the PHP web server. If it is you should be easily able to extend the PHP code to send data to the Arduino without any firewall issue. The interaction with the Arduino will be a PC programming issue, not a web/firewall issue.

...R

Hey Robin you are right that is my mistake. it is the other way around from website to arduino i didn't think screwed that one up that is my fault.

No the web server is not on a pc. I have godaddy hosting.

josephchrzempiec:
No the web server is not on a pc. I have godaddy hosting.

It would help if you could give us all of the relevant information rather than feed it out in little pieces.

Are you planning to have a PC collect the data from the server and pass it to the Arduino? You could easily write a Python program to do that. And I'm sure it could be done with PHP also.

...R

And, after writing the PC part, as I stated before,

it can be very hard to open a channel from the webserver (internet) to a PC
residing behind an unknown number of firewalls in an unknown environment.

Most if not all firewalls block incoming traffic unless told otherwise.