Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines
2 posts • Page 1 of 1
Jedijds wrote:How could I make upgrades that my player could buy from a store? Could someone show me to a tutorial? Or make on?
You can use Python httplib to communicate between blenderplayer and the website (with PHP and some database )
In that manner:
Code: Select all
# needed for sending data routines
#values we want to send
username = "JOHN"
score = 1230
# connect to the server just as the browser do - to the 80 port.
con = httplib.HTTPConnection("yoursite.com", 80)
print "sending request...",
# send the GET request, note the path to the script doesn't start from server name, the path is absolute.
# we send data after ? as variablename=variablevalue separated by &
#get response from server - status codes here: http://www.w3.org/Protocols/HTTP/HTRESP.html
# 200 means OK
resp = con.getresponse()
print resp.status, resp.reason
Who is online
Users browsing this forum: No registered users and 1 guest