user14762: I need an Arduino to send a message, to be displayed on the web, after pressing a push button, which is connected to an Arduino [or shield], without using a GSM shield. 
I need to send a message just by using HTML/PHP code included in the Arduino IDE. This displayed message should contain two buttons. One button is used to turn a LED ON/OFF and the other to open a streaming video.
Can anyone help me with the Arduino code and explain how I should do that? Is there any third party device, apart from a GSM shield, that can help me to send that message?

user6424: Use this example to open a webpage using a push button, you need Python installed on your Windows.
Step 01:
Upload this sketch to your arduino:
const int buttonPin = 2; // the number of the pushbutton pin
int buttonState = 0;

void setup() {
  Serial.begin(9600);  
  pinMode(buttonPin, INPUT);
}

void loop() {
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {
  Serial.println("OpenWebPage");
  }
}

The Circuit:

pushbutton attached to pin 2 from +5V
10K resistor attached to pin 2 from ground


Step 02:
Open a text editor and paste this code to a new file:
import serial
from subprocess import call

ser = serial.Serial(
    port='COM5', # Change this to your COM port number
    baudrate=9600,
    parity=serial.PARITY_ODD,
    stopbits=serial.STOPBITS_TWO,
    bytesize=serial.SEVENBITS
)

if (ser.isOpen()):
    print "Serial Port is Open..."
    print "Waiting for a command ..."
    while 1:
        cmd = ser.readline()
        if cmd.strip() == "OpenWebPage":
            print "Received command from Arduino..." 
            print "Opening webpage..." 
            call(["explorer", "http://www.google.com"]) #change it the address you want

Save the file to your desktop, name it : SerialListener.py
Step 03

Now open a Command Prompt window.
Navigate to your desktop folder and execute this command: python SerialListener.py.
You should see Serial Port is Open... Waiting for a command ...
Press the push button, and a webpage should open in your default browser.


14762: <p>I need an Arduino to send a message, to be displayed on the web, after pressing a push button, which is connected to an Arduino [or shield], without using a GSM shield. </p>

<p>I need to send a message just by using HTML/PHP code included in the Arduino IDE. This displayed message should contain two buttons. One button is used to turn a LED ON/OFF and the other to open a streaming video.</p>

<p>Can anyone help me with the Arduino code and explain how I should do that? Is there any third party device, apart from a GSM shield, that can help me to send that message?</p>
 6424: <p>Use this example to open a webpage using a push button, you need <code>Python</code> installed on your Windows.</p>

<p><strong>Step 01:</strong></p>

<p>Upload this sketch to your arduino:</p>

<pre><code>const int buttonPin = 2; // the number of the pushbutton pin
int buttonState = 0;

void setup() {
  Serial.begin(9600);  
  pinMode(buttonPin, INPUT);
}

void loop() {
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {
  Serial.println("OpenWebPage");
  }
}
</code></pre>

<p><strong>The Circuit:</strong></p>

<ul>
<li>pushbutton attached to pin 2 from +5V</li>
<li>10K resistor attached to pin 2 from ground</li>
</ul>

<p><a href="https://i.stack.imgur.com/F5lqY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F5lqY.png" alt="enter image description here"></a></p>

<p><strong>Step 02:</strong></p>

<p>Open a text editor and paste this code to a new file:</p>

<pre><code>import serial
from subprocess import call

ser = serial.Serial(
    port='COM5', # Change this to your COM port number
    baudrate=9600,
    parity=serial.PARITY_ODD,
    stopbits=serial.STOPBITS_TWO,
    bytesize=serial.SEVENBITS
)

if (ser.isOpen()):
    print "Serial Port is Open..."
    print "Waiting for a command ..."
    while 1:
        cmd = ser.readline()
        if cmd.strip() == "OpenWebPage":
            print "Received command from Arduino..." 
            print "Opening webpage..." 
            call(["explorer", "http://www.google.com"]) #change it the address you want
</code></pre>

<p>Save the file to your desktop, name it : <code>SerialListener.py</code></p>

<p><strong>Step 03</strong></p>

<ul>
<li>Now open a Command Prompt window.</li>
<li>Navigate to your desktop folder and execute this command: <code>python SerialListener.py</code>.</li>
<li>You should see <strong>Serial Port is Open... Waiting for a command ...</strong></li>
<li>Press the push button, and a webpage should open in your default browser.</li>
</ul>
