curl

Post Curl issue

<?php $url = "http://website.com/folder/index.php"; $data = array('id' => 'R98s', 'name' => 'Bob', 'content' => 'Hello'); $handle = curl_init($url); curl_setopt($handle, CURLOPT_POST, true); curl_setopt($handle, CURLOPT_POSTFIELDS, $data); curl_exec($handle); ?> This works great, only 1 problem though, id like a way to get the conten...

getting the POST request from web server

Hi I'm having troubles debugging a POST request I'm making from my web server to another web server. I'm trying to communicate with a SOAP web service but from some reason a code that worked well from local machine fails when executing on my server Looking for a way to see the post request my server make to the web service server web ser...

Pycurl cannot connect to host

Hi, I am writing a pycurl script, which worked right on linux, but on mac os x I get the error: Traceback (most recent call last): File "curl.py", line 47, in <module> c.perform() pycurl.error: (7, "couldn't connect to host") any help? Thanks ...

PHP: Proxy another url

I have a mod_rewrite rule that will send any subdomain requests to a php script which should proxy those requests to another host (internal proxy, not 302). I'm close, in that my script works with web browsers, but curl seems not like it: curl: (56) Received problem 2 in the chunky parser Here is my mod_rewrite: RewriteCond %{HTTP...

Curl to VB.net conversion

Hi, ive searched everywhere and cannot find how to post data using vb.net So i was wondering if someone can convert this curl code I made into vb.net :) $useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_USERAGENT, $useragent); curl_...

Issue logging stdout from curl with .net (C#)

Hi, I'm trying to run curl as a process and capture the output from the command window. I have tried both running curl directly as a process and also running cmd and then writing commands to the command prompt. However, the output from curl itself is not being returned (verbose mode is on), although I sometimes get what looks like an ...

How do I use cookies with RCurl?

I am trying to write an R package that accesses some data via a REST API. The API, however, doesn't use http authentication, but rather relies on cookies to keep credentials with the session. Essentially, I'd like to replace the following two lines from a bash script with two R functions: One to perform the login, and store the session ...

"Session expired" and "Please enable cookies" warnings when POSTing website form through cURL

I have been developing a program that is able to login to AWeber.com, and perform mass imports of data. The script uses the PHP cURL libraries, along with their CookieJar settings to spoof a normal user with a browser. The script works perfectly, allowing login, and the changing of lists, but when it comes to posting the form data (in t...

Why is this warning being shown: "Received problem 2 in the chunky parser"?

Hi, I am trying to use PHP and cURL to log in to a website (namely Craigslist). When accessing the script, I get this warning message: Received problem 2 in the chunky parser Searches showed that it is not a problem associated with cURL. I am unable to find the source of the problem. What may be the reason? Thank you. ...

Linking problems using libcurl with Visual C++ 2005: "unresolved external symbol __imp__curl_easy_setopt"

Hi, I am planning to use libcurl in my project. I had downloaded the library source,built and integrated it in a small POC application. I am able to build and run the application without any issues with the generated libcurl.dll and libcurl_imp.lib files. Now when I integrate the same library in my project I am getting linker errors. ...

how to maintain session in cURL in php?

how can we maintain session in cURL? i'am having a code the sends login details of a site and logs in successfully i need to get the session maintained at the site to continue. here is my code that used to login to the site using cURL <?php $socket = curl_init(); curl_setopt($socket, CURLOPT_URL, "http://www.XXXXXX...

select outgoing ip for curl request

I have a server with two different IPs. I need to send odd curl requests from first IP, and even from the second one. How can i select outgoing ip address? my php script is something like this: $curlh = curl_init($url); curl_setopt($curlh, CURLOPT_USERAGENT, $uagent); curl_setopt($curlh, CURLOPT_RETURNTRANSFER, true); $result = curl_ex...

CURL + $GLOBALS["HTTP_RAW_POST_DATA"] in PHP

I'm using CURL to upload files to a service. currently I'm getting the file content with $GLOBALS["HTTP_RAW_POST_DATA"] then save it on my server. after that, I'm using CURLOPT_POSTFIELDS with the file's full path. Is there a way to send the file content directly, without saving it on my server, as if I saved it? Or is there a way to ...

"Use of undefined constant CURLOPT_PROTOCOLS and CURLPROTO_HTTP" but it works?

Hi on our dev environment we have show all errors, warnings and notices. I'm getting this: Notice: Use of undefined constant CURLOPT_PROTOCOLS - assumed 'CURLOPT_PROTOCOLS' in C:\notion\implementation\development\asterix\library\ExternalLibs\panda.php on line 69 Notice: Use of undefined constant CURLPROTO_HTTP - assumed 'CURLPROTO_HTT...

Code to download this link with PHP curl

This link http://ajaxcontroltoolkit.codeplex.com/releases/view/11121#DownloadId=28808 shows a popup on which one has to agree before being able to download. So how to automate this with PHP curl ? Any existing similar sample code ? ...

How to use system in Cocoa to invoke curl

Hello, I was wondering the best way to upload file to a web server in cocoa. I cant seem to get my curl code to work even though it works when run from terminal. curl code: system(@"curl -T /file.txt http://webserevertouploadto.com") Thanks for any help ...

php curl: i need a simple post request and retrival of page example

Hiya. i would like to know how to send a post request in curl and get the response page thanks ...

php curl: how can i emulate a get request exactly like a web browser?

Hi. there are websites that when i open specific ajax request on browser i get the resulted page, but when i try to load them with curl, i receive an error from the server. how can i properly emulate a get request to the server that will simulate a browser ? that's what i'm doing: $url="https://new.aol.com/productsweb/subflows/ScreenN...

Why my Google endpoint is always the same?

always: https://www.google.com/accounts/o8/ud i got wordpress openid ok. so i think is is just discovery phase got some probelms.. <?php $ch = curl_init(); $url = 'https://www.google.com/accounts/o8/id'; $url = $url.'?'; $url = $url.'openid.mode=checkid_setup'; $url = $url.'&openid.ns=http://specs.openid.net/auth/2.0'; $url = $u...

cURL + HTTP_POST, keep getting 500 error. Has no idea?

Okay, I want to make a HTTP_POST using cURL to a SSL site. I already imported the certificate to my server. This is my code: $url = "https://www.xxx.xxx"; $post = "";# all data that going to send $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); c...