Created
February 4, 2016 11:32
-
-
Save cadrev/e7167ba918616372a62a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# | |
# Kayo nalang maglagay kung paano kukunin iyong | |
# data from the database tapos either gawin niyo sya | |
# na script running on the background or | |
# naka cron job per minute | |
# | |
data = "get from local database" | |
http_address = "http://somewebsite.com/saveData.php?myData=" | |
request_string = http_addess + data | |
os.system('curl ' + request_string) |
Okay na pala!
Ang ginawa ko:
os.system('curl ' + ' " ' + request + ' " ')
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you po kuya sa tulong!
May tanong po pala ako, hindi ko po kasi magawa yung multiple requests:
http_address = "http://admupowermgt.co.nf/service_populateDB.php?"
data1 = "100"
data2 = "12.523"
request = http_address + "a1=" + data1 + "&a2=" + data2
os.system('curl ' + request)
Ang nangyayari po ay yung
a1
lang ang nagreregister, nagteterminate na siya kaagad pagkadating sa&
. Ang sabi po sa internet kailangan raw lagyan ng double quotes, sinusubukan ko po pero hindi na na-rread ng system.Maraming salamat po ulit Kuya!