I am generating dynamic URLs of images for book ISBNs. I need a reliable way with PHP to check whether the images actually exist at the remote url. I tried various approaches with different PHP libraries, curl, etc., but none of them works well, some of them are downright slow. Given the fact that I need to generate (and check!) about 60...
Right now, my application is using the c-ares asynchronous DNS resolver library on Windows below cURL, and I have users complaining that it behaves differently from other windows apps. One particular user said that "other applications are using the Microsoft DNS client" and experiences no problems.
cURL itself has an asynchronous DNS im...
I'm using PHP CURL to send a request to a server. What do I need to do so the response from server will include that server's IP address?
...
Actually I have two questions.
(1) Is there any reduction in processing power or bandwidth used on remote server if I retrieve only headers as opposed to full page retrieval using php and curl?
(2) Since I think, and I might be wrong, that answer to first questions is YES, I am trying to get last modified date or If-Modified-Since head...
Hi, I was finishing my script and suddenly libcurl stopped working. I thought the server I was connecting to was down or something, but invariably of where I try to connect I get the same sucky error. I even tried rebooting my box, same results. The code snippet where things happen is:
public function navigate(array $data)
{
...
I'd like to automate some administrative task for myself on my wpmu install. For example, I'm trying to write php curl script for logging in and adding a new blog. So i'm already logged in via curl and now i want to post form that's in wpmu-blogs.php but it has hidden wp nonce field. How do i get this value into variable? I checked sourc...
I'm having a problem with curl_multi_*, I want to create a class / function that receives, lets say 1000 URLs, and processes all those URLs 5 at a time, so when a URL finishes downloading it will allocate the now available slot to a new URL that hasn't been processed yet.
I've seen some implementations of curl_multi, but none of them al...
I am working with the FaceBook API to upload photos, and the API requires a local file path. As far as I can tell they are handing the request off to CURL like such: upload=@localfilename
But my files don't reside locally, so I am trying to figure out if there is a way to make it work with a remote file....
I tried pointing it to a l...
I have form (on my own blog/cms install which i want to play with a bit) with hidden value which i want to extract. Problem is that there are 2 forms on that page, each with that hidden field with value. On each form field name is the same, only hidden value differs. Something like this:
<input type="hidden" id="_hiddenname" name="_hidd...
I have a PHP script that's supposed to take in a URL and search a database for a cached version of the URL. If it finds it, it prints out the cached version to the user, otherwise it downloads it using cURL and echos it to the user. Currently, the downloading script looks something like this:
// create a new cURL resource
$ch = curl_i...
I was thinking of doing a head request with cURL, was wondering if this is the way to go?
...
Hi ,
I have an application on php-Codeigniter hosted on MediaTemple and I want to have a cron job runing a controller, the support told me to use CURL I tried using without any succes, example:
curl http://mydomain.com/admin/action/get
My controller inserts some information to a database, the curl doesn't display error but the ins...
I got this far:
:~ curl -u username:password -d status="new_status" http://twitter.com/statuses/update.xml
Now, how can I alias this with variables so I can easily twit from Terminal? How can I make the alias working through different sessions (when I close Terminal aliases reset).
Thanks!
...
Hi
I am doing some automation for a client and was planning on running some php scripts via cURL in the process. However URLs that work fine in a browser are coming up 404 when hit by cURL. I have seen mention elsewhere that some servers are configured to block cURL in this manner.
Is this a setting I could edit in httpd.conf? Doesn...
My cUrl call is returning HTML code like:
"Some stuff."
and I'd like to convert it to a UNIX string like:
"Some stuff."
Is there a way to do this without using search and replace?
...
Hi,
I'm using CURL to connect to multiple xml feeds and process them when the page loads. Unfortunately, every once in awhile a page won't be responsive and my script will stall as well. Here's an example of the code that I'm working with. I set the timeout to 1 but that doesn't appear to be working. I then set the timeout to 0.0001 j...
I have written a script for Letitbit.net. With help of cURL I can get to the page where after 60 secs is to appear the link to the file I want to download. That page uses frames... If I get to the page via a browser, the sourse code looks just like this:
<frameset rows="125,70,*" frameborder="no" border="0" framespacing="0">
<frame src=...
I'm looking for a URL that I can use with curl that will take on input an IP address and have it return the geographical location of the IP. Anybody know of one?
Thanks.
...
Hello
How to get the destination URL using cURL? when the http status code is 302?
<?PHP
$url = "http://www.ecs.soton.ac.uk/news/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$html = curl_exec($ch);
$status_code = curl_getinfo($ch,...
I am currently playing with couchdb and testing out the 'standalone attachments' feature, which is described near the bottom of this page.
I am trying to use curl's --data-urlencode feature to send the creation request, which only half works. I can create the attachment and retrieve it, but the Content-Type field is wrong, so the im...