PHP » PYTHON |
login |
register |
about
|
PYTHON Using PHP's cURL module to fetch the example.com homepage
is this article helpful?
|
Python replacement for PHP's Using PHP's cURL module to fetch the example.com homepage
[
edit
| history
]
# from Shehabix: I am not going to delete your post but this isn't PHP to Google App Engine . . we're talking about Pythong Here . . .
I build an application using Google App Engine, and i have to fetch the Email Template from my own server, to i use the from google.appengine.api import urlfetch result = urlfetch.fetch(someurl) result.content PHP Using PHP's cURL module to fetch the example.com homepagePHP original manual for Using PHP's cURL module to fetch the example.com homepage [ show | php.net ]Once you've compiled PHP with cURL support, you can begin using the cURL functions. The basic idea behind the cURL functions is that you initialize a cURL session using the curl_init(), then you can set all your options for the transfer via the curl_setopt(), then you can execute the session with the curl_exec() and then you finish off your session using the curl_close(). Here is an example that uses the cURL functions to fetch the example.com homepage into a file: Example #1 Using PHP's cURL module to fetch the example.com homepage
<?php
|
more
Recently updated
more
Most requested
more
Last requests
|