Showing posts with label curl. Show all posts
Showing posts with label curl. Show all posts

Tuesday, June 5, 2012

file_get_contents VS CURL, what has better performance?


I am using PHP to build a web crawler to crawl millions of URLs, what is better for me in terms of performance? file_get_contents or CURL ?

PHP - curl_exec hangs


I am having a strange problem with the below php function. Unfortunately this is one of those special "Production only" case.

Block images, CSS or JS if the user did not visit my site


I suddenly get a lot of requests to my site (wget, curl etc...).

Friday, May 4, 2012

file_get_contents with https?


I'm working on setting up credit card processing and needed to use a workaround for CURL, and the following code worked fine when I was using the test server (which wasn't calling an SSL URL), but now when I am testing it on the working server with https, it doesn't work ("failed to open stream").

Handling PUT/DELETE arguments in PHP


I am working on my REST client library for CodeIgniter and I am struggling to work out how to send PUT and DELETE arguments in PHP.

How do I CURL www.google.com - it keeps redirecting me to .co.uk


I am using CURL to check for the existence of a URL (HEAD request) but when I test it with www.google.com , it redirects me to www.google.co.uk - probably because my server is UK-based.

Thursday, April 12, 2012

Copy Image from Remote Server Over HTTP


I am looking for a simple way to import/copy images from remote server to a local folder using PHP. I have no FTP access to the server, but all remote images can be accessed via HTTP (i.e. http://www.mydomain.com/myimage.jpg ).

Friday, April 6, 2012

Send SOAP XML via curl, PHP




This has been bugging me for days, i'm trying to send a SOAP post via curl but i just keep getting a 'couldn't connect to host' error but i really cant see how.

POST a file string using cURL in PHP?


I was wondering if it is possible to post a file - along with other form data - when the file is just a string?

Wednesday, March 7, 2012

cURL equivalent in JAVA


I am tasked with writing an authentication component for an open source JAVA app. We have an in-house authentication widget that uses https. I have some example php code that accesses the widget which uses cURL to handle the transfer.

Tuesday, February 28, 2012

disable form action redirect when using curl to load a page


Could someone give me an idea on how not to redirect the page when using cUrl. I mean, i got this code:

Monday, January 30, 2012

PHP cURL timeout is not working


I'm having a server issue. I'm running a local server (for developing) and I've changed my local server from MAMP to XAMPP. However, on XAMPP, the cURL option CURLOPT_TIMEOUT_MS or CURLOPT_CONNECTTIMEOUT_MS gives me the next error:

Sunday, January 29, 2012

Posting Data to Amazon using curl


when we enter a keyword (search term) in amazon kindle book store, search brings a list of books back.

Monday, January 16, 2012

Friday, January 13, 2012

Getting the HTML source code of an .swf URI


I was wondering whether one could get the HTML source code from an .swf URI?