curl

Simple telnet example in LIBCURL - C++

I need to fing simple TELNET example in LIBCURL (curl.haxx.se/libcurl) (C++) I searched over this site, but I don't found any simple example. I need only to connect to TELNET, authenticate, and send message. Thanks ...

Finding out where curl was redirected

I'm using curl to make php send an http request to some website somewhere and have set CURLOPT_FOLLOWLOCATION to 1 so that it follows redirects. How then, can I find out where it was eventually redirected? ...

Sending a file via HTTP PUT in PHP

I've been struggling for several hours trying to figure out how to get this work. I'm trying to send a file via HTTP-PUT to an eXist db. There is user authentication for the server, so I was trying to do something like this: I have the URL where the doc is to be PUTted to I have the username and password for the eXist DB I have the co...

Downloading from member area of a site programmatically with cURL

This is the sort of link I want to download with: http://username:[email protected]/dl/file.zip Edit: stackoverflow seems to go weird with colons, its username-colon-password. Now, if I log out of the website and use the URL pattern above, it successfully authenticates and I can successfully download the file. I have this cURL sc...

Image Upload Using php - curl

Hello Friends, We are struggling to automatically upload images using php - curl. Please let me know if there is any way to do the same. ...

cURL/Snoopy: How do I read cookie data when sending POST data in the background, API?

Hey I have a script that POSTs all data sent to it directly to another page. On the second page, the script calls for several variables set as $var = $_COOKIE['name']; The problem is that the script seems to not set the variables that read data based on cookies any time the script is called from a background cURL/Snoopy POST. How can ...

To auto fill a text area using php curl.

Hi Friends, We are trying to auto populate a form which is having a text area. <textarea name="myarea"></textarea> We can do it using curl however it is accepting only the part of the input text. If the content is too large then it accepts nothing. There is no restriction with respect to number of characters on the text area. $area[...

curl w3c-markup-validator localy is slow, how do I make it faster?

I am using curl like this: curl -s -F "uploaded_file=@/path_to_file;type=text/html" -F output=soap12 http://localhost/w3c-markup-validator/check >text.xml && xsltproc script/guilbep_soap_w3c.xsl text.xml xsltproc is fast; but curl is not. does it come from the fact that w3c-markup-validator is local? or from w3c-markup-validator itsel...

How do I use a Perl CGI locally without using curl and apache2?

I would like to submit a form to a CGI script localy (w3c-markup-validator), but it is too slow using curl and apache, I want to use this CGI script more than 5,000 times in an another script. and currently it takes more than one hour. What should I do to give the form directly to the CGI script (I upload a file with curl)? edit: It se...

Create new etherpad using PHP and CURL

I'm trying to write a simple PHP script which automatically sets up new etherpads (see http://etherpad.com/). They don't have an API (yet) for creating new pads so I'm trying to figure if I can do things another way. After playing around some, I found that if you append a random string to etherpad.com to a not-yet-created pad, it'll co...

CUrl PUT with xml data

Hi I'm facing a problem with curl as I am unable to issue a PUT request with inline XML data, I'm not sure how its done but I hade a couple of goes on it with different techniques. First I tried using the CURLOPT_UPLOAD as its the default CURL option for PUT and tried to append the xml data manually: typedef map<string, string> hea...

Is there any way to disable image downloads when scraping data using PHP cURL?

I just need text data. I can't find the answer to it anywhere. ...

how to use curl to post message to a facebook business page?

I wonder there is a way to post a message to a facebook business page with cURL? thanks ...

Running a php cron job - problem with execution time

Hello, I have a site where I download data from one site using cUrl a then generate a image from it, which is stored on the server and displayed on other websites. I've got everything working perfectly, except from a cron job. Whenever I run this script it stops after a while (it's more than 30 secs though, more like 2-3 minutes, it's...

PHP Curl adds '\' to apostrophe character sending to ASP page

I have a 3rd party server which has a classic ASP page which takes in form data. From my web page I have a PHP script which sends fields to the ASP page using curl. Everything works fine except if a user includes an apostrophe character to the text. In the back end it is received as "\'". What is even odder is that it only does this ...

PHP scraping problem with Google "I'm feeling lucky"

I'm trying to scrape using Google "I'm Feeling Lucky" button. For small query like 'iteminfo.ca' it works, because it redirects me to iteminfo.ca. This is the query url: http://www.google.com/search?hl=en&amp;source=hp&amp;q=iteminfo.ca&amp;btnI=I%27m+Feeling+Lucky But for the query like '061754020164 site:iteminfo.ca' it doesn't wo...

How do i check if php server allows external curl connections

How do i check if php server allows connecting via curl to external sites before buying hosting package (or registering on free host)? I noticed that in some hosting reviews users were complaining that servers that have curl enabled often don't allow external connections... I'd like to check this before purchasing/registering. Maybe t...

Reading 200 urls automatically with varying intervals between requests

By calling the example URL below my Java servlet caches one file at a time (with corresponding "filekey"). http://www.example.org/JavaServlet?fileKey=phAwcNAxsdfajsdoj&amp;action=cache Now I have 200 files I'd like to cache ... Instead of calling all these URLs manually I'd like to use fopen, curl or something else to automatically go ...

CURL / screen scrape delivery tracking details from Canada Post

I need to obtain delivery tracking details from the Canada Post website, which does not offer an API. I've formulated a URL that when entered into a browser correctly returns the tracking information, but I can't get the request to function with CURL (it returns a 500 We're Sorry page). class cURL { var $headers; var $user_agent; v...

Curl setting Content-Type incorrectly

I am running a curl operation on the command line and am having trouble forcing the header to set as XML. I use the -H option to force the Content-Type to be xml, however, once I run the command I can see that the header is sent as urlencoded which is tainting one of the data values that I'm sending. Can someone explain to me why the Con...