curl

How do I make curl ignore the proxy?

Hi, How do I make curl ignore the proxy? Setting $NO_PROXY doesn't seem to work for me. Thanks, Kenneth ...

Unable to download data from my server fast in terminal

I run unsuccessfully curl $Masi@host:~/folder curl: (6) Couldn't resolve host 'host:~' I have SSH-keys to the host. I am trying to use curl similarly as scp. How can you use curl to download private data fast? ...

PHP CURL call fails to a wordpress RSS feed

Hi! I'm trying to do a CURL call to an RSS feed from a wordpress, I'm not using simplexml_load_file() because it's forbiden by php.ini to do such calls, so I'm trying to get the xml via CURL, so far it works for any URL but not for wordpress RSS feeds, even if they are on the same server. If I access the Feed URL directly on my browser...

curl not working for getting a web page content, why?

Hi all i am using a curl script to go to a link and get its content for further manipulation. following is the link and curl script: <?php $url = 'http://criminaljustice.state.ny.us/cgi/internet/nsor/fortecgi?serviceName=WebNSOR&amp;amp;templateName=detail.htm&amp;amp;requestingHandler=WebNSORDetailHandler&amp;amp;ID=368343543'; //cur...

What Steps do you Take to Troubleshoot Problems with PHP cURL?

Almost any working PHP programmer has faced having to use CURL to send raw HTTP requests, whether it's for credit card payment processing, nefarious screen scraping, or something in-between. Almost any forum where PHP programmers congregate has a large number of people who can't get the cURL functions to do what they want. When cURL is...

Why is curl sending the command-line before the message body in an HTTP PUT?

I'm issuing the command (line broken for readability): curl -H"X-RequestIsAbsolutePath: F" \ -T /tmp/out \ -H'Content-Type: application/xml' \ "http://localhost:8182/metadata/036-Rotated.JPG" I'm sending a message body of XML. I get a complaint from the XML parser on the server about content not being allowed in the prolog. I added ...

Logging in to meetup.com with Curl

Hi all I'm trying to automatically log in to www.meetup.com without much success:- This is my code:- <? $username="[email protected]"; $password="123abc"; $url="http://meetup.com"; $cookie="cookie.txt"; $postdata = "email=". $username ."&password=". $password . "&submitButton=Login"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL,...

Get the last modified date of a remote file

I would like to get the last modified date of a remote file by means of curl. Does anyone know how to do that? ...

Post and Get via CURL

I'm trying to send information from a form and a hidden email variable (from a db) to a PHP script using cURL. I have the post items moving correctly, but I am not sure if can also send a variable vai the url. (the $_Get) ...

webrick server / ie6 truncating javascript files in development mode

I'm using webrick to run my rails app in development mode. The page includes 4-5 javascript files, which are also being served by the same webrick instance. When I load the page on ie6, it appears the javascript files are getting truncated after the first few lines -- can anyone explain that? e.g. if the page contains this script tag:...

How can I see the request headers made by curl when sending a request to the server?

I want to see the request headers made by curl when I am sending a request to the server. How can I check that? ...

Get image dimensions with Curl

I would like the height*width of a remote image. Could that be done with Curl, and if so how? ...

Using CurlPP with vs2008

...

RAW POST using Curl in PHP

How can I do a RAW POST in PHP using curl. Raw post as in without any encoding, and my data is stored in a string. The data should be formatted like this ... usual HTTP header ... Content-Length: 1039 Content-Type: text/plain 89c5fdataasdhf kajshfd akjshfksa hfdkjsa falkjshfsa ajshd fkjsahfd lkjsahflksahfdlkashfhsadkjfsalhfd ajshdfhsa...

xpath with curl gives empty result?

This code gives me an empty result. I expect it to print out the titles from the XML-file. I need to use Curl to get the file. <?php function get_url($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec(...

pycurl: RETURNTRANSFER option doesn't exist

I'm using pycurl to access a JSON web API, but when I try to use the following: ocurl.setopt(pycurl.URL, gaurl) # host + endpoint ocurl.setopt(pycurl.RETURNTRANSFER, 1) ocurl.setopt(pycurl.HTTPHEADER, gaheader) # Send extra headers ocurl.setopt(pycurl.CUSTOMREQUEST, "POST") # HTTP POST req ocurl.setopt(pycurl.CONNECTTIMEOUT, 2) ...

php script hanging up because of curl

This script is causing my php file to hang: $handle = curl_init($pictureimg); $connectable = curl_exec($handle); curl_close($handle); Any idea why? It was working a few days ago. Then I think I accidentally changed a setting somewhere, and all my curls have stopped working. ...

how to get the cookies from a php curl into a variable

So some guy at some other company thought it would be awesome if instead of using soap or xml-rpc or rest or any other reasonable communication protocol he just embedded all of his response as cookies in the header. I need to pull these cookies out as hopefully an array from this curl response. If I have to waste a bunch of my life wri...

Upload text as file with POST (multipart/form-data) using php and curl

The API, I'm trying to implement requires the upload of XML file, containing the commands. The straightforward way to do this is to generate the content of the file, write it on the file system and upload it with curl to the web server. What I'm trying to accomplish is to skip the writing part by using php's temp protocol handler. The ...

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). Example use: A user wishes to add an image to his profile. The image already exists on the web and the user p...