curl

Using brackets within a cookie name.

Hello! I'm trying to use brackets within the name of a cookie. It is supposed to look like this(this is how the browser wants it!): Name: name[123456].newName Content: 20 Here is my example: $cookie = "name[123456].newName=20" But when I analyze what the browser sees, I get this: cookie['name'] = Array And I want: cookie['nam...

cURL - can't get POST response

Hi, I'm trying a basic thing. I have two files: curl.php and form.php curl.php <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://localhost/test/test34_curl_post/form.php"); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT...

PHP, cUrl and ASP

I'm tryng to get data using PHP's cUrl extension. The page runs ASP. I do two cUrl requests, the first one to get Models, and the second one to get the Model Age. I don't know why, but __EVENTVALIDATION is the same in both requests. I'm posting the following data: Array ( [ScriptManager1] => UdtMarca|ddlMarca [ddlAnoValor] => 0 ...

Python code like curl

in curl i do this: curl -u email:password http://api.foursquare.com/v1/venue.json?vid=2393749 How i can do this same thing in python? ...

How to package a PHP application\script?

I have a script that uses php and curl to auto logon to a site and perform some actions. That bit is ok but I now want to send the script to other people so they can use it. So I can create a batch file that executes the script. The problem will be the users won't have php instaled on their computer and would probally have to enable ...

RESTful request to Rails app using curl ignores AuthenticityToken

Is there any reason that AuthenticityToken would be ignored when executing a REST HTTP request using curl? curl http://localhost:3000/Asset/9f3cb180-e410-11de-8a39-0800200c9a66.xml -X DELETE The above will execute remove an Asset of the given ID from the database with no regards to what the AuthenticityToken is (usually nil). class ...

changing SSL certificates to a different location

Hi, Currently we read from HTTPS using cURL. Everything works fine. We set up certficates in curl as follows: curl_easy_setopt(curl,CURLOPT_SSLCERTTYPE,"PEM"); curl_easy_setopt(curl,CURLOPT_SSLCERT,"/etc/ssl/certs/abc.cert.pem"); curl_easy_setopt(curl,CURLOPT_SSLKEYTYPE,"PEM"); curl_easy_setopt(curl,CURLOPT_SSLKEY,"/etc/ssl/certs/ab...

using curl or wget commandline to download files

Hi all, I apologize if this question was asked earlier and if its a simple one. I am trying to download a file from http website onto my unix machine using command line.I log onto this website using a username and password. Say I have this link (not a working link) http://www.abcd.org/portal/ABCPortal/private/DataDownload.action?downl...

Avoid 'waiting for response' in php ?

Hi, I have a php script that uses exec() function to execute curl to download file. The file is about 600mb. So when I acess the php file on a browser, browsers shows me 'waiting for response' message. How do I avoid that? my php source is $a = exec("curl 'http://lab.test.com/test/test/down.php?c=23212' -o 'test.avi'"); ...

Update Twitter status using PHP Form

I have the following code, but it doesn't update my status (the username and password has been removed for this snippet) and it throws the error eeek. Any ideas why it's not working? EDIT: Apparently Twitter NEEDS OAuth instead now. I have been following this tutorial here: http://ditio.net/2010/06/07/twitter-php-oauth-update-status/ ...

parsing a curl in the command line

I have this: curl -H \"api_key:{key}\" http://api.wordnik.com/api/word.xml/dog/definitions How do I parse this (within the commandline) to make it take whatever's in between <text> and </text> in this page? ...

to catch curl error in php

I am using PHP's Curl functions to post data to the web server from my local machine. the code that i am using, $c = curl_init(); curl_setopt($c, CURLOPT_URL, $url); curl_setopt($c, CURLOPT_RETURNTRANSFER,true); curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_POSTFIELDS, $data); $result=curl_exec ($c); if(curl...

curl simple form, why session false

hi i tried many tutorials but all failed, i know for an experienced user it might be obvious, thx anyway. there is the simple form: https://www.shab.ch/shabforms/COMMON/application/applicationGrid.jsp?template=1&amp;view=2&amp;page=/COMMON/search/searchForm.jsp?MODE=SHAB here is my script which returns only the empty form instead of ...

curl -u equivalent in .Net WebClient class

The question explains it all but here is some more info. I am trying to use 4sq api with C# and need to send username password pair in every request. The API documentations says that "curl -u user:pass" does the job but how can I do it with WebClient? Don't have time to inspect the traffic, maybe someone knows about it... WebClient.Cred...

How to setup a local xampp behind my company's proxy

I am trying to do curl requests through my local xampp setup but my company has a firewall proxy that needs to authenticate on port 8080. Can I have apache login to this proxy authenticate and complete the curl requests? ...

PHP multi curl - find out what proxy was used for a particular curl handle

I'm using multi curl with anonymous proxies, and I want to flag the proxies based on performance and location etc after the curl handle is returned. I've tried curl_getinfo() but that does not return information about the proxy used for that curl handle. Any ideas? I've thought about maybe a way to identify a particular handle and stor...

How do I post to a form and populate a select multiple?

I'm doing something a bit strange here, I'm querying data out of my local database and posintg it to Salesforce form using cURL. The data posts correctly to Salesforce. However, the select multiple is not getting the correct values selected. See $sd["location"] below in my code: //init curl $ch = curl_init(); //setup the p...

USPS API Returning 501 NOT IMPLEMENTED

I am attempting to utilize the USPS API to do some address verification/validation. I'm sending this XML to http://testing.shippingapis.com/ShippingAPITest.dll: <AddressValidateRequest%20USERID="xxxxx"><Address ID="0"><Address1></Address1><Address2>6406 Ivy Lane</Address2><City>Greenbelt</City><State>MD</State><Zip5></Zip5><Zip4></Zip4...

curl: (7) couldn't connect to host

Curl has been installed on server, but its not working. curl: (7) couldn't connect to host Please explain how can I diagnose the issue and fix that. I am using "/usr/bin/curl -L http://www.yahoo.com" PING is working ... ...

PHP CURL: Complete manipulation of HTTP Headers not allowed?

I've been working on writing a script which automatically logs me into my school's network, checks if the classes I'm trying to get into are no longer completely full, and if a spot has opened up, registers the class for me. However, I've hit a big snag in just the logging-in process. Basically, I've been looking at the headers that are...