curl

Using Curl for load time testing PHP

Using PHP if I load the URL http://www.cars.com with Curl then use curl_getinfo() to find the total time it takes to load... Will it calculate the load time including all images, and anything else displayed on the page. Or just the HTML (or whatever) file that is located at http://www.cars.com ? curl_getinfo($ch, CURLINFO_TOTAL_TIME); ...

cURL app using Java

Does anyone have a good tutorial on how to write a java or javafx cURL application? I have seen tons of tutorials on how to initiate an external call to say like an XML file, but the XML feed I am trying to retrieve calls for you to submit the username and password before being able to retrieve the XML feed. ...

How to scrap asp.net site having search functionaity with POST data with hidden fields like VIEWSTATE,__EVENTARGUMENT,__EVENTTARGET,__EVENTVALIDATION

I am Trying to scrap the asp.net site using curl...But didn't get any serach result .... Giving error "Invalid Search Criteria" PLease Help. Thanks ...

I have tried to login to facebook via curl,

I have successfully logged into facebook in this manner but cannot seem to keep the facebook logged in as soon as you click anything in facebook it redirects you to the login page. I pondered this + thought that it was due to the fact that curl was using the cookie + not the browser, thus when you click you are un - authenticated. is t...

Json - removing square brackets and identifying a certain string

I need some way to either - remove the square brackets when either saving via curl or decoding the json text file and or remove both "created" and "modified" strings so that I am left with just the url string please when saving using curl. [{ "created":"10:30pm 5 August 2010", "url":"\/Images\/Temp\/7553-12a40d5af00-12a45a200-...

Grabbing Twitter Friends Feed Using PHP and cURL

So in keeping with my last question, I'm working on scraping the friends feed from Twitter. I followed a tutorial to get this script written, pretty much step by step, so I'm not really sure what is wrong with it, and I'm not seeing any error messages. I've never really used cURL before save from the shell, and I'm extremely new to PHP s...

Having trouble limiting download size of PHP's cURL function

I'm using PHP's cURL function to read profiles from steampowered.com. The data retrieved is XML, and only the first roughly 1000 bytes are needed. The method I'm using is to add a Range header, which I read on a Stack Overflow answer (curl: How to limit size of GET?). Another method I tried was using the curlopt_range but that didn't wo...

CURL PHP send image

It's trivial to get image from server but I think about something different. It is crazy question but... Is it possible to send file (image) to a server but not using form upload or ftp connection? I want to send a request to eg. http://www.example.com/file.php with binary content. I think I need to set Content-type header image/jpeg but...

Using curl to send mail from gmail

Is it possible to login to my gmail account and send mail using curl in php? I don't want to use pop3 or any other function. $msg = "something"; $email = "[email protected]"; $pass= "something" function send($msg, $email, $pass) { //something } I have never used curl, to be honest. Have just heard of it. ...

Bouncing an Apache http auth proxy request to another device

I've got a hardware internet radio player which needs to play a stream which is behind an http auth (standard 401 request). Unfortunately, the device can't cope with http auth, you can't build the username and password into the link (eg: username:password@http etc - and besides, the server won't accept that) and it plays streams by call...

cURL and PHP: Stop output to screen

Following my last question again; This small script is supposed to grab my twitter friends feed and store the xml as a string. However, it keeps outputting all of the data (minus the xml, actually) to the browser. What am I doing wrong? <html> <head> <title>Twitcap</title> </head> <body> <?php function twitcap() { // Set your us...

Craigslist, CURL, Simple PHP DOM Issues

I am logging into Craigslist with CURL to scrape the status of my posted listings. The problem I encounter is the transfer of HTML from CURL $output to file_get_html. While Craigslist statuses are actually nested inside TR elements, I just wanted to test the most basic functions to see if things were getting passed through (i.e. link s...

File name length limit for AppleScript in URL Access Scripting?

I'm having a strange AppleScript issue, and can't seem to figure out the underlying cause, or a solution. I'm trying to download files with a process that mimics the one below. This code fails for me, reporting "URL Access Scripting got an error: Can’t make some data into the expected type." number -1700 to item" If I remove 3 character...

How import contact from yahoo/gmail/hotmail using php script

How can we import contact from yahoo/gmail/hotmail using php script and or using curl. Thanks ...

How to call website with IP address as URL

hi friends, i wand to call my website with IP address some thing like this hxxp://255.255.255.1 ...

PHP curl via proxy

Hi, My wordpress install (local development environment) is stuck behind a proxy and I'm having to hack plugins so they can see things likt the flickr API. I'm doing this by adding proxy options to curl requests. Does anyone know of a way of setting curl options globally? There are no php.ini directives. Thanks, ...

How to upload files (multipart/form-data) with multidimensional POSTFIELDS using PHP and CURL?

I'm having problems with posting a multidimensional array with file uploads using PHP and CURL. The multidimensional array is for example: $post['question'] = 'Are you human?'; $post['answers'] = array('yes', 'no', 'maybe'); $post['file'] = '@/path/to/file'; // Output: Array( 'question' => Are you human?, 'answers' => Array( ...

cURL & XPath to display href anchor text?

The following PHP code uses cURL, XPath and displays all the links on a certain page ($target_url). ** What I'm trying to do is figure out how to display only the the anchor text (the linked words in an href) on a given page when I supply the website value. For example...I want to search "randomwebsite.com" to see if there is a lin...

convert fopen to curl?

Hi everyone I have recently changed servers, and one of my scripts is not functioning on the new server, as fopen is not enabled? Is it possible to change the following code to use the CURL function instead? Hope someone can help! <?php $postToFileName = 'http://www.somesite.com/postfile.aspx'; $postArr = array( 'NM' => $row['Lead_...

Curl GET request through Zend_Http_Client

Hi, I am trying to make a GET request to gowalla spots by Zend_Http_Client (cURL adapter) here is my class: class Application_Model_Gowalla { private $_config; private $options; private $array; private $json; public function __construct() { $conf = Zend_Registry::get('config'); $this->_confi...