Hello everyone

I haeve tried to understand the capabilities of python in web development. Have gone throuhg forums and online tutorials. Nevertheless I am not able to find any topic which can give me some insite along with basic examples of how to send http get data from an xp mashine using python code to php on web server.

I have some parameters to collect from windows mashine via http get and collect them on web server using php.

Any hint how to begin would be appreciated.

Maybe you are not answered, because nobody understands what you are trying to accomplish.
If you want to program a custom client that gets data from a http server, then you can go with urllib, urllib2 or any other application (ie web crawler) that is built on those.

http://www.voidspace.org.uk/python/articles/urllib2.shtml

But you mentioned php, and that is a contradiction. Maybe you have got knowledge of the http's server side language independence.

Hi, you can do what you need with this easy python to php example that I code for a client of mine:

#!/usr/bin/python
 
import urllib
import urllib2

url = "http://172.16.1.4/01.php"
data = {"name": "FErArg"}
data = urllib.urlencode(data)
request = urllib2.Request(url + '?' + data)
response = urllib2.urlopen(request)
page = response.read()

SerInformaticos
info@serinformaticos.es
www.SerInformaticos.es

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.