curl

Get remote image using cURL then resample.

I want to be able to retrieve a remote image from a webserver, resample it, and then serve it up to the browser AND save it to a file. Here is what I have so far: $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "$rURL"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEA...

Content cacheing with PHP and CodeIgniter

I have a couple of things I'm working on, namely a page that issues five or six cURL requests and processing content on them. I'm working with CodeIgniter on a LAMP stack but am open to other options. Naturally I would prefer to not rewrite the application. I would like to know if there are any ready-made / easily learned caching metho...

What directory does CURL to be saved to in Xampp?

Hello, I am trying to get started with CURL. I am running windows vista and have xampp installed. I downloaded the curl zip and extracted this but the curl executable when run just does a quick flash of a command promp then disappears. where am I going wrong on this curl install? ...

Getting search results from Twitter in php

I'm attempting to put together a little mashup with some twitter APIs. However, the whole area is new to me (I'm more of an embedded developer dabbling). And frustratingly, every tutorial I am trying in Php is either out of date, not doing what it claims to do, it or is broken. Essentially, I just want a nice bit of example code - say...

How to perform an external request in Kohana 3?

I've always used cURL for this sort of stuff, but this article got me thinking I could request another page easily using the Request object in Kohana 3. $url = 'http://www.example.com'; $update = Request::factory($url); $update->method = 'POST'; $update->post = array( 'key' => 'value' ); $update->ex...

Login to Gmail Inbox using Curl ?

Hello friends, I'm doing a project where user will first save his gmail id and password and after confirmation,I will provide a link for directly login to gmail next time without entering his gmail id and password.. the saved password will passed as a parameters of userid and passwd using CURL I'm doing this using php.. I heard about c...

How to send from fields and a file using PHP Curl?

I'm trying to send form fields and file to a web service using php curl. The form has already been passed from a browser to a proxy php client web app and I'm trying to forward it to the web service. When I pass an array to curl_setopt like this: curl_setopt($this->ch, CURLOPT_POSTFIELDS, $this->fields); I get a Array to String notice...

PHP Curl get HTTP code, not whole document

I'm using curl in PHP to check the HTTP code when requesting some files, I'm trying to make my speed run faster so I'm wondering is there a way to make it get the HTTP code without actually getting the web page from the remote host ...

how do i troubleshoot transfer closed with outstanding read data remaining or Empty reply from server?

Hi all, Recently and without any website code changes, a few of our dynamic PHP pages are either only partially rendering or not rendering at all. When the page won't render at all, and when I run curl, this is what I see: curl -lv http://mysite.com/create_ad.php * About to connect() to mysite.com port 80 * Trying 66.777.888.999... ...

Enabling curl in php5

Hello, I am using macports on my machine and I realized that curl is not enabled. Is there anyway to enable it without completely reconfiguring php? Thanks! ...

curl multiple requests cookie issue

I'm using curl multi API for multiple curl requests. first I'm using a single request to login to a site and save the cookie file. then I'm using the curl multi API to get some data from that site. The problem I'm facing is that from some reason the cookie file does not get read and I'm redirecting to the main login page. I must say t...

Google Translate translates inline Javascript Code

Hi, I have some PHP code that sends a section of html code including some inline Javascript code by curl to google. When i get it back from Google translated into the language that i chose, the Javascript code has been translated too. Any ideas as to how i can stop Google translating my inline JavaScript code? Thanks, M ...

How can I CURL POST a file using file pointer in C++

I have a file pointer, such as the following: FILE* f = tmpfile() How do I use libcurl to do a HTTP POST to a URL as a field named F1? I tried reading the file contents into a char* array but and used the following to upload: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <curl/curl.h> #include <curl/types.h> #...

Advice needed- aweber form submission using curl?

Advice needed for backend form submission to aweber and get response. Scenario When customer signup at my form, I will 1. insert the customer details into my own database, 2. send them a welcome email from my system, 3. at the same time I want the email to be added into aweber (this should run in the background, so that customer no ...

Set php file permissions so only my server's curl can run

I have a PHP script that I don't want anyone to be able to run through their browser. It sends emails and is called via curl by my server's cron, yet needs to be in the public www directory. What permissions or owner do I need to set the file to to allow only my server's curl to execute (or do I mean read) the file? I'm on centos. ...

Fast Remote PHP Technique To Detect Image 404

What PHP script technique runs the fastest in detecting if a remote image does not exist before I include the image? I mean, I don't want to download all the bytes of the remote image -- just enough to detect if it exists. And while on the subject but with just a slight deviation, I'd like to download just enough bytes to determine a JP...

How to store multiple cookies through PHP Curl

'SOUP.IO' is not providing any api. So Iam trying to use 'PHP Curl' to login and submit data through PHP. Iam able to login the website successfully(through cUrl), but when I try to submit data through cUrl, it gives me error of 'invalid user'. When I tried to analysed the code and website, I came to know that cUrl is getting values of...

Getting page by GET, then submiting form

Hi there. I need to get one page (can be cURL, or filegetcontent), get some info from it, then submit form on same page. I don't want to reload page, becouse some things will change. How to do it? Thanks ...

Could not load php_curl

Hello I have installed php5.2.13, apache2.2.15 on WindowsXp.Add C:\php to PATH ssystem variable. I can't enable curl extension. I configure extension_dir and remove ";" form php_curl in php.ini but nothing! I copied ssleay32.dll and libeay32.dll in system32 directory - nothing Error log say: PHP Warning: PHP Startup: Unable to load...

Faster alternative to file_get_contents()

Currently I'm using file_get_contents() to submit GET data to an array of sites, but upon execution of the page I get this error: Fatal error: Maximum execution time of 30 seconds exceeded All I really want the script to do is start loading the webpage, and then leave. Each webpage may take up to 5 minutes to load fully, and I don't ne...