try:
    import RPi.GPIO as GPIO
except RuntimeError:
    print("Error importing Rpi.GPIO")

GPIO.setmode(GPIO.BCM)
GPIO.setup(24, GPIO.OUT)

@@ -1,9 +1,13 @@
+##
 try:%0A
+##
     
@@ -30,16 +30,18 @@
 as GPIO%0A
+##
 except R
@@ -53,16 +53,18 @@
 eError:%0A
+##
     prin
@@ -97,53 +97,257 @@
 O%22)%0A
-%0AGPIO.setmode(GPIO.BCM)%0AGPIO.setup(24, GPIO.OUT
+import sys, json%0A%0A# Load the data that PHP sent us%0Atry:%0A    data = json.loads(sys.argv%5B1%5D)%0Aexcept:%0A    print %22ERROR%22%0A    sys.exit(1)%0A%0A# Generate some data to send to PHP%0Aresult = %7B'status': 'True'%7D%0A%0A# Send it to stdout (to PHP)%0Aprint json.dumps(result
 )%0A

change to button info