473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

http call.

Hi!

I have a php program (test.php) on a server. eg:
http://abc.xyz.com/test.php

I need my python scripts to make a http call to these program pass some
data and get back a secret key from the php program..

Could anyone help me this, what will i need to make a http call to the
php application?

Oct 24 '06 #1
3 1400
Kirt wrote:
Hi!

I have a php program (test.php) on a server. eg:
http://abc.xyz.com/test.php

I need my python scripts to make a http call to these program pass some
data and get back a secret key from the php program..

Could anyone help me this, what will i need to make a http call to the
php application?
The fact that it's a PHP (or Java or Python or .NET or whatever)
application is totally orthogonal as long as you're using HTTP. And you
may want to have a look at the urllib and urllib2 modules in the
standard lib.

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Oct 24 '06 #2
Kirt wrote:
Hi!

I have a php program (test.php) on a server. eg:
http://abc.xyz.com/test.php

I need my python scripts to make a http call to these program pass some
data and get back a secret key from the php program..

Could anyone help me this, what will i need to make a http call to the
php application?
import urllib
nf = urllib.urlopen('http://abc.xyz.com/test.php')
data = nf.read()

Should get you started. Look for the "mechanize" and "ClientForm" (?)
modules to help with the site interactions. It doesn't matter what
language the server uses: you will be talking HTTP to it!

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Oct 24 '06 #3
Steve Holden 写道:
Kirt wrote:
>Hi!

I have a php program (test.php) on a server. eg:
http://abc.xyz.com/test.php

I need my python scripts to make a http call to these program pass some
data and get back a secret key from the php program..

Could anyone help me this, what will i need to make a http call to the
php application?

import urllib
nf = urllib.urlopen('http://abc.xyz.com/test.php')
data = nf.read()

Should get you started. Look for the "mechanize" and "ClientForm" (?)
modules to help with the site interactions. It doesn't matter what
language the server uses: you will be talking HTTP to it!

regards
Steve
Use urllib2 library , you can take more control.
Oct 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: WebRod | last post by:
Hi, i have a script (script1) which needs to call another script (script2). It should not wait for the answer, so script2 should run in the background. I really need to call the php script...
1
by: Erik Johnson | last post by:
Hi, I am trying to spawn a daemon type program to go off on its own and do some work (asynchoronously) from within an HTTPServer, but I am running into a problem where the web browser (actually...
0
by: David Palau | last post by:
We have a internal company WinForms application that makes some calls out to a intranet web service (once at application start-up for some configuration info and then periodically during the life...
0
by: Sameer Deshpande | last post by:
Hi, I am using python SOAPpy module to call a web service. Call to web service gets executed successfully. I am facing a problem if the call to WS results into redirect. I get "HTTPError:...
0
by: benboals | last post by:
Note: this is in reply to a message from August 2 which i found searching for help on my own problem. I couldn't seem to reply to it, but a friend suggested that simply using the same subject...
7
by: Wladimir Borsov | last post by:
I want to call a perl script myscript.pl in my cgi-bin from a HTML web page. This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). Furthermore NO button click...
0
by: Dean Hallman | last post by:
Hello, I am developing a BHO that should add a custom HTTP header on a specific domain only. Don't want the header globally, otherwise I could just add a registry key. So, on...
1
by: msg2ajay | last post by:
hello friends, I wrote a WebService client as below import org.apache.axis.client.Call; import org.apache.axis.client.Service; import javax.xml.namespace.QName;
1
by: John Straumann | last post by:
Hello all: I am trying to call an ASPX page from another ASPX page code-behind file by using the HTTP Request object. By loading the page and typing: javascript:alert(resultRender.outerHTML) ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.