curl

PHP Curl sending an empty array

Ok, I've checked the other questions similar to this one, and none seem to point out to a solution to my problem. I have the following code: <?PHP $tamanho = $_REQUEST['tamanho']; $post_data['item_quant'] = $_REQUEST['item_quant']; $post_data['email_cobranca'] = $_REQUEST['email_cobranca']; $post_data['tipo'] = $_REQUEST['tipo']; $post...

php multi exec is slow (19 minutes?)

Hi all, I have a curl_multi_exec call to about 500 sites which it calls via an array loop: I am using the simplified code: http://github.com/kminkler/php-curl-multi/wiki but it gets VERRRY slow (19 minutes) towards the end... do I need to remove the handle every time is this a memory issue; Would you rec. writing a C++ curl routine...

Facebook PHP SDK Curl over proxy

Im trying to setup php sdk. SDK is using Curl to make request. But i have to do this by proxy. My OPTS: public static $CURL_OPTS = array( CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 60, CURLOPT_USERAGENT => 'facebook-php-2.0', CURLOPT_PROXYPORT => '8080', C...

How can my app parse twitter (xml or json) response [200 or 401]?

How can my app parse the Twitter response when someone using a curl command, like this: curl -v -H 'X-Auth-Service-Provider: https://api.twitter.com/1/account/verify_credentials.json' -H 'X-Verify-Credentials-Authorization: OAuth realm="http://api.twitter.com/", oauth_consumer_key="**jhtmLUypg82g", oauth_signature_method="HMAC-SHA1", oa...

PHP - File_get_content error

Hey, I have tried hosting it on a VPS/web Host and some VPS it works my script and some it gives this error: Warning: file_get_contents(http://xip.xxxxx.org/xxxx/../aaaada23.php?user=rawr&amp;host=127.0.0.1&amp;port=3074&amp;time=10&amp;ip=127.0.0.1&amp;power=1) [function.file-get-contents]: failed to open stream: A connection...

how to prevent curl from doing upload

There are many questions and guides on how to get cURL to DO file uploads, but what I'm asking today, is how to NOT get it to do that. According to the curl options docs on php.net, curl "knows" to attempt a file upload by when a param starts with "@" then the local file path This is all well and fine, but what do you do if you need to...

cURL / maintain sessions/cookies with a website

Possible Duplicate: how to maintain session in cURL in php? Hi, the question is obvious i want to maintain a session with a website without letting it know that it is php/curl or a browser. ...

trying to POST to w3c validator with python script

I'm trying to use this python script to upload a file to the w3c validator. ~/Desktop/urllib2_file$ python test-upload.py -u http://validator.w3.org/ -f ../index.php -n uploaded_file -p Content-Type=text/html > ../results.html && firefox ../results.html Any help will be greatly appreciated! EDIT: cyraxjoe pointed out I needed to run...

How can i send HTTP requests and recieve responses using a DLL?

hi, i am a metatrader developer. it has it's own script language which is similar to C in syntax. one of it's most advantages is that it let you include some dll and use it's functions. now, i want to send and receive HTTP requests. which DLL should i use and how? in PHP context i always use cURL library. does it have any DLL that coul...

Paperclip & Rails Api

I have a photo rails app using paperclip. My model called photo and the request parameter also photo.So when i am trying to upload via curl i use : curl -F "photo[photo]=@/pics/pic.jpg" http://something/photos.xml . That's works fine! How can i change the photo[photo] parameter to "photo" or "media" or something else? How can i change th...

Problem with CURL fetch function

I've created a php script that will allow the removal of user properties. The script first finds all properties associated with a user and then loops to remove all of them. When I run this for a certain user, it gets down to the foreach loop and it prints out all the the properties ($name2) but it seems to get stuck on the curl_fetch...

Using PUT method with PHP cUrl Library

Hi all, I'm able to run the following curl command (at the command line) successfully: curl -XPOST --basic -u user:password -H accept:application/json -H Content-type:application/json --data-binary '{ "@queryid" : 1234 }' http://localhost/rest/run?10 Here is what I'm doing so far however it doesn't seem to be working with the REST se...

cURL issues with HTTPS and Facebook Graph API

I'm trying to connect to Facebook's graph api using the PHP-SDK. The session is being created fine, however I'm getting the following error Fatal error: Uncaught CurlException: 1: Protocol https not supported or disabled in libcurl thrown in .../app/vendors/facebook/graph/facebook.php on line 622 I have tried to correct this by addin...

WebRequest giving 301 XML document not valid when Curl worked fine

I am trying to send an xml formatted document that I create to a phone and I keep getting a response back of 301 XML document not valid. I went on the W3C website and tested the string and it seems fine... here it so people see it. I was using php orgionally with cURL and here is what that looked like. XMLData = urlencode($X...

curl to wc3 validator not working?

when I run the following, i get a w3c page with upload options, as though nothing has been uploaded. curl seems to be putting it up though, so i'm at a loss as to what to even troubleshoot dylan@MAJUSCULE:/opt/lampp/htdocs/dylanstestserver$ php index.php > test.html && curl -F "[email protected];type=text/html" http://validator....

PHP Word Crawler

Hi, How to get all unique words from a webpage in an array? (without all attributes and javascript etc.)? Could anybody help me with this? ...

lattice levelplot only fails under RApache

I'm working on a PHP web app that calls R through curl and RApache. Most things work fine. But one lattice plot throws this error: RApache Warning/Error!!!Error in uy + c(-1, 1) : non-numeric argument to binary operator I tried saving the data structures that feed into the plot and doing the plot in my local R, but then the pl...

Using Curl to Post to a Restful Rails Application

Could someone enlighten me on how to upload files the RESTful way to a Rails application? I experimented with curl to simulate uploading an image to a rails controller. At first I got authenticity token errors and so disabled them, and then tried curl -F "[email protected]" http://localhost:3000/photos/create but this didn't ...

possible to use CURL to create exact replica of page?

I'm working on a system for our users to position choose the location they want to put their adverts on pages of our website. I want to create a preview of the host-page page inside a div on our Advert Positioning page (which i can then modify). I've already investigated iframes (which works same-domain), but am interested to see wheth...

cURL ports not open - any viable alternative?

I have a client hosted with GoDaddy - but they're quite restrictive with their service and don't allow very many ports to be open. I have a script that needs to communicate on an arbitrary port (1129) via cURL but of course GoDaddy won't have any of it. Is there any alternative that I can implement to still confer with the target source...