curl

how do i see the url my computer is currently hitting?

I am on Mac OSX. I wrote a program to parse a few websites. The websites are being accessed using curl. How can I view which url my computer is currently hitting? ...

cURL and ActiveMQ

Hi all, I need an example on how to read/write to an ActiveMQ queue over HTTP in C or C++ using cURL (or something else, I'm open to anything at this point). I have working code in C#, but it doesn't help. Any help is appreciated, Thank you. ...

php problem with russian language

i get page in utf-8 with russian language using curl. if i echo text it show good. then i use such code $dom = new domDocument; /*** load the html into the object ***/ @$dom->loadHTML($html); /*** discard white space ***/ $dom->preserveWhiteSpace = false; /*** the table by its tag name ***...

How to send line break with curl?

I've tried the following to send a line break with curl, but \n is not interpreted by curl. curl -X PUT -d "my message\n" http://localhost:8000/hello How can I send a line break with curl? ...

PHP curl questions - running multiple times

I have this code: <?php foreach($items as $item) { $site = $item['link']; $id = $item['id']; $newdata = $item['data_a']; $newdata2 = $item['data_b']; $ch = curl_init($site.'updateme.php?id='.$id.'&data1='.$newdata.'&data2='.$newdata2); curl_exec ($ch); // do some checking here curl_close ($ch); } ?> Samp...

Problem POSTing an multidimensional array using cURL PHP

Hello! I'm having problems posting an array using PHP cURL. I have successfully posted other values to the same page using POST-variables. But this one is hard to figure out. The only problem is how I should present the data to the server. I checked the original form using a form analyzer. And the form analyzer shows that the POST vari...

CURL Request Issue

So I'm a beginner to all of this. I'm attempting to teach myself how to properly use CURL, and dabble a bit in API calls (don't worry, this question only relates to using CURL). Now my original code worked just fine - I structured the request using urlencode, and the vast majority of requests leaded to the responses I was looking for. ...

My password curl is failing sometimes?

$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $PathUrl); curl_setopt($ch, CURLOPT_USERPWD, 'someuser:somepass'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); $info = curl_getinfo($ch); Any ideas on why it works about 30% of the time and the other 70% if fails....viewing the url on any ...

Curl request is failing on the SSL?

I have this code if(ereg("^(https)",$url)) curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,false); // execute, and log the result to curl_put.log $result = curl_exec($curl); $error = curl_error($curl); The error specified is SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 Any ideas on the cause ...

How to authenticate to webservice with curl?

I am trying to get curl to run a webservice for a site I am working with. The site requires a login. I tried using --user:password with curl, but to no avail. How do I find out how to authenticate with the site? ...

Default cURL option values

I was refactoring my cURL class today and thought about looking at default values of cURL FLAGS. Could anyone tell me where I might find or how could I output them? PS: If it's possible at all. ...

curl + jsecurity authentication

I have a grails app that is using jsecurity plugin for authentication. How do I use curl to send my credentials? If I just do curl -u username mysite I get a prompt for a password, then nothing. I tried to do an anyauth command and this is what I got for the site. Any idea why it is returning a 302? dcole@DCOLE-L /cygdrive/c/dev $ cu...

Why is PHP's utf8_encode breaking my utf-8 string?

I'm doing a kind of roundabout experiment thing where I'm pulling data from tables in a remote page to turn it into an ICS so that I can find out when this sports team is playing (because I can't find anywhere that the information is more readily available than in this table), but that's just to give you some context. I pull this data u...

Auto redirect / download if image doesn't exist - optimisation

I have a lot of images on my website, they are pulled from an image server onto the main server when requested to save disk space at my hosting server. To achieve this I have an entry in my .htaccess file that basically internally redirects people from /images/image.jpg to download.php which checks to see if the file exists. If the fil...

Multi-thread/parallel requests in PHP

How can I make multi-thread (parallel) GET requests in PHP? I know that there is a CURL multi-thread support, but there is no limit of active requests number and actual callbacks configuration for every success request completion. ...

php curl with CURLOPT_FOLLOWLOCATION error

i got an error CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in i google many solution, but with this site they don't work. only need CURLOPT_FOLLOWLOCATION. stupid hoster don't want to enable safe_mode or an open_basedir . can i enable them by myself, may be create htaccess with s...

Curl PHP File Upload

Hey, trying to post a file using curl and all is working great. I have one problem. I can't declare my file outside of my post_file() function. I call this function in my application many times so want it to be reusable. So this works: function call_me(){ $file_path = "/home/myfile.mov"; $url = "http://myurl.com"; $this->...

PHP cURL and ob

Someone had asked me to help him with cURL today, and as a result I looked up the function that I written a while ago. I was wondering why I used the ob functions. I probably followed some tutorial at the time; however, when I look at most cURL classes now they don't use the ob functions... I suppose the question is, what is better perfo...

> sign inside OBIEE GO URL?

Hello, I am trying to use a '>' symbol inside a GOURL to retrieve a report in PDF format automatically to users desktop. I'm actually using a perl script to programmatically request the login page, login using my credentials, and then I use a go url to download pdf report, sending it parameters,(doing URL encoding which includes convert...

DotNetNuke, PHP, Simulating a remote postback using curl

I have a page in DNN like: http://nolimitswebdesign.com.dnnmax.com/test/tabid/57/ctl/Edit/mid/374/Default.aspx I need to send a post request to that page using PHP+Curl which modifies the content of text area and saves it (like as if someone modified it manually and clicked the update button on that page). I doubt that with DNN it might...