curl

perform cURL functions in CodeIgniter

I have to perform import-content functions from remote pages from my website using page urls provided by users. In short what digg, mixx, designfloat, etc do when we submit a story using the url. Only I have to do it with CodeIgniter. I would really appreciate if someone could please tell me the best way to do something like this within ...

With php cURL get filename from file header

Hello, I have this php cURL function: function curl_login($url,$data,$proxy,$proxystatus){ $fp = fopen("cookietlt.txt", "w"); fclose($fp); $login = curl_init(); curl_setopt($login, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($login, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($login, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MS...

AuthSub token from Google/YouTube API is always returned as invalid

Anyone out there have experience with the YouTube/Google API? I am trying to login to Google/Youtube using clientLogin, retrieve an AuthSub token, exchange it for a multi-session token and then use it in our upload form. Just a note that we are not going to have other users logging into our (secure) website, this is for our use only (no...

curl error 18 - transfer closed with outstanding read data remaining

Hello, when retrieving data from a URL using curl, I sometimes (in 80% of the cases) get error 18: transfer closed with outstanding read data remaining Part of the returned data is then missing. The weird thing is that this does never occur when the CURLOPT_RETURNTRANSFER is set to false, that is the curl_exec function doesn't return ...

SFTP from PHP - undefined constant CURLOPT_PROTOCOLS and CURLPROTO_SFTP?

From my php script, i need to be able to upload a csv file to a remote server via sftp. I followed the accepted answer from this question: http://stackoverflow.com/questions/717854/sftp-from-within-php Here's what my code looks like <?php error_reporting(E_ALL); ini_set('display_errors', 1); $ch = curl_init(); $localf...

curl + sessions

Hello! I'm making POST requests with CURL, and I would like to output cookies made during that request... Is that possible? :) ...

Non-browser emulation of JavaScript - is it possible?

I have a new project I am working on that involves fetching a webpage, (using PHP and cURL) parsing the HTML and javascript out of it and then handling the data in the results. Basically I hit a brick wall when the site uses javascript to fetch its data by AJAX. In this case, the initial data will not appear in the fetched page unless ...

PHP Curl Paypal Sandbox

Is it possible to use CURL and Paypal's Developer Sandbox? When I try this code it says in print_r($lines); that I need to login to the Sandbox, how can I make it send my browser cookie? This code is from http://leepeng.blogspot.com/2006/04/standard-paypal-php-integration.html $orderno = $_SESSION["ss_last_orderno"]; $ppAcc ...

Does git clone work through NTLM proxies?

I've tried both using export http_proxy=http://[username]:[pwd]@[proxy] and git config --global http.proxy http://[username]:[pwd]@[proxy]. I couldn't make it work. It looks like git uses Basic authentication: Initialized empty Git repository in /home/.../.git/ * Couldn't find host github.com in the .netrc file, using defaults * About...

PHP cURl: Can I check if my user agent is working?

I'm writing a cURL script, but how can I check if it's working and passing properly when it's visiting the website? $ckfile = '/tmp/cookies.txt'; $useragent= "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Mobile/7A400"; $ch = curl_init ("http://website.com"); cur...

cURL Error when using CURLOPT_FOLLOWLOCATION

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/public_html/curl.php on line Trying to use curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, TRUE); but I'm getting this error. How can I overcome it? ...

Reliable way to determine an active domain name using cURL?

I'd like to run checks to see if a given URL is registered or not. As a simple proxy for testing if it's registered, I was going to check HTML response codes. 200, 300 probably == registered, 4xx probably == not registered. I understand that there might be holes in this logic. My question is if cURL has a way to return the HTML response...

Are there examples of WWW::Curl::Multi?

Does somebody have a working example of using WWW::Curl::Multi? ...

Login via cURL to Javascript Page?

Hey guys, I'm having some trouble devise a script which attempts a login to a billing portal (Freshbooks) using cURL. I've seen various examples of this online (http://www.trap17.com/index.php/automatic-login-curl%5Ft38162.html) however, none of these examples would with JavaScript. The login page seems to be based on JavaScript and jq...

how to debug curl call to amazon s3 when it get stuck

I'm using the PHP S3 class and this backup script to backup ~500Mb file from Linux server to S3. The call to s3 gets stuck (never returns) and top shows httpd process which consumes 100% CPU and 1% memory. smaller files do get copied correctly. my question is how can I debug this (its basically a CURL call done by the S3 class) when not...

cURL: How do I know if my cookies are being set properly?

$ckfile = tempnam ("/tmp", "CURLCOOKIE"); $useragent="Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16"; $ch = curl_init ("website.com"); curl_setopt($ch, CURLOPT_USERAGENT, $useragent); curl_setopt ($ch, CURLOPT_COOKIEJAR, $ckfile); curl_setop...

PHP Curl POST Problem Causing PHP to use 100% CPU

I'm trying to upload data with POST to my webserver but sometimes cURL just stalls and causes PHP to use 100% CPU indefinitely. I'm using the code below. $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $URL); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5); curl_setopt($curl, CURLOPT_POSTFIELD...

What are the right uses for cURL?

I have already heard about the curl library, and that I get interest about... and as i read that there are many uses for it, can you provide me with some Are there any security problems with it? ...

Cannot enable cookie in php curl

Here is my code to use curl: class cURL { var $headers; var $user_agent; var $compression; var $cookie_file; var $proxy; var $process; function cURL($cookies = TRUE, $cookie = 'cookies.txt', $compression = 'gzip', $proxy = '') { $this->headers [] = 'Connection: Keep-Alive'; $this->headers [] = 'Con...

Are there any CURL alternatives for C++?

I hate CURL it is too bulky with too many dependencies when all I need to do is quickly open a URL. I don't even need to retrieve the contents of the web page, I just need to make the GET HTTP request to the server. What's the most minimal way I can do this and don't say CURL !@#$ ...