Hi guys!
Code:
import httplib, urllib
msgvar = "themsg"
numvar = "mynumber"
params = urllib.urlencode({'nvar': numvar, 'mvar': msgvar})
print params
print "Completed encoding!"
conn = httplib.HTTPConnection("www.mysite.com")
print "Completed connection!"
theurl="/tests/domypost.php?"+params
print theurl
conn.request("GET", theurl)
print "Process Completed!"
I ran this from my phone and it gets stuck at the line when the conn.request() is called. (I was able to figure that out by using the print statement after every process)
I also installed Python version 2.2.2 on my comp (just to match the 2.2.2 on the phone). The code works fine on the comp. But gets stuck at the above said line when run on phone.
Any idea what needs to be done to get this working?
Info:
- Nokia N70 Music Edtion
- Pys60 1.4.2 for 2nd edition FP3
- Tested dir(httplib), it seems to be fine
- GPRS is working fine on Nokia browser and Opera Mini
- I am inserting the sent values into a DB thru the php file. My DB is empty, so there seems to be a problem with connection.
- I read on the forums that urllib is better than httplib but when I used urllib.request() it again gets stuck on my phone but works fine on comp
--
Wondering!