Hello all,
I have a site that has a simple API which can be used via http. I wish to make use of the API and submit data about 1000-1500 times at one time. Here is their API: http://api.jum.name/
I have constructed the URL to make a submission but now I am wondering what is the best way to make these 1000-1500 API GET requests? Here is...
Hi, I am using Pommo for my mailing list, unfortunatelly Pommo doesn't provide an HTTP API but provides and embedable subscription form I can put on my site. But posting using that form takes me out of my site and that is unacceptable for me.
So I want to do the field validation in Rails and then use curl to post the values.
The fields...
With twitter being down today I was thinking about how to best handle calls to an API when it is down. If I am using CURL to call their api how do I cause the script to fail quickly and handle the errors so as not to slow down the application?
...
how can i save a file using curl and php
...
I've got a php script that uses curl and everything is fine. It runs via a cron job. I come back later and each time it runs a new file with the output has been saved.
How do I prevent these files from being created?
...
I am using curl and xml to post my xml to a URL.
I am getting response from it right now, but its not displaying in output.
when I take the View Source page by right clicking its there like the XML file output.
I need to store that xml document to a file.
I used this code below
<?
$path = "https://newport.ingrammicro.com/mustang"; /...
I'm trying to get the response of a curl call into a variable in perl.
my $foo = `curl yadd yadda`;
print $foo;
does not work. When I run this at the command line the curl call prints all its output correctly in the terminal, but the variable is not filled with that data.
Is there a way to do this without installing and calling th...
Hi guys -
I am in a bit of a pickle. I have a few Mac Minis that I am colocating at my ISP and only have shell access (via ssh for example) to administer the boxes. This is fine, but I just realized - after downloading some tar files for a couple of packages I needed - that I don't have the basic dev tools installed (such as make, fo...
What's the Fastest way to get a large number of files (relatively small 10-50kB) from Amazon S3 from Python? (In the order of 200,000 - million files).
At the moment I am using boto to generate Signed URLs, and using PyCURL to get the files one by one.
Would some type of concurrency help? PyCurl.CurlMulti object?
I am open to all s...
For some reason, when using this code the file it outputs is just called ".jpg".
<?
$title = $GET['title'];
$url = $GET['url'];
$ourFileName = $title.jpg;
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileHandle);
$ch = curl_init ("http://www.address.com/url=$url");
curl_setopt($ch, CURLOPT_HEADER, 0)...
Hi!
I've just started using HTTParty, and i've encountered a problem in the way it builds the Hash from the XML replied by the server.
If i setup the following Builder template on the server:
xml.thunt :sendSubscriptionResult, :"xmlns:thunt" => "http://example.com/thunt", :status => @status
everything works well, i.e. the Hash built...
I would like to make a php script that can capture a page from a website. Think *file_get_contents($url)*.
However, this website requires that you fill in a username/password log-in form before you can access any page. I imagine that once logged-in, the website sends your browser an authentication cookie and with every consequent browse...
I need to make a proxy script that can access a page hidden behind a login screen. I do not need the proxy to "simulate" logging in, instead the login page HTML should be displayed to the user normally, and all the cookies and HTTP GET/POST data to flow through the proxy to the server, so the login should be authentic.
I don't want the ...
Greets.
So, I'm running Fedora Core 8 on an Amazon EC2. I installed httpd, php5 and libcurl, and a bunch of other stuff. Seemed to be working great, but then I realized that POST data isn't being sent by curl in my php scripts. Same request in the command line works tho. I also ran the same php scripts on my local machine (Win XP) and a...
Im using cURL to log into a website and then store a session cookie.
Is there a way I can access that session cookie from another PHP script (in the same dir etc.) Ive tried:
$ch = curl_init();
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_URL, $url);
echo $content = curl_exec ($ch);
curl_close ($ch);
B...
Hi,
I use curl, in php and httplib2 in python to fetch URL.
However, there are some pages that use JavaScript (AJAX) to reterive the data after you have
loaded the page and they just overwrite a specific section of the page afterward.
So, is there any command line utility that can handle JavaScript?
To know what I mean go to: monste...
I have a PHP script that uses CURL to fetch a remote page and return the output as is. It displays fine in the browser, but the problem is, when I click a link it is still using the old base url. Can I force the browser with some kind of HTTP Header or something to use the base url of the server that I fetched the page from in my PHP scr...
I'm trying to get character data from www.wowarmory.com using PHP and cURL.
The code I have so far is:
...
$browser = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070319 Firefox/2.0.0.3";
$url = "http://www.wowarmory.com/character-sheet.xml?r=Ner'zhul&n=Visar";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_...
I have a PHP script that does an HTTP request on behalf of the browser and the outputs the response to the browser. Problem is when I click the links from the browser on this page it complains about cookie variables. I'm assuming it needs the browsers cookie(s) for the site.
how can I intercept and forward it to the remote site?
...
Hello all,
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12.4M 100 12.4M 0 0 4489k 0 0:00:02 0:00:02 --:--:-- 4653k
The above is a CURL output from the command line when download the file. I have captured...