I'm doing some cURL work in php 5.3.0.
I'm wondering if there is any way to tell the curl handle/object to keep the cookies in memory (assuming I'm reusing the same handle for multiple requests), or to somehow return them and let me pass them back when making a new handle.
Theres this long accepted method for getting them in/out of the...
Hello,
I'm currently using the Amazon S3 PHP Class, getObjectInfo()
The line I'm using is this:
$info = $s3->getObjectInfo($bucketName, baseName($uploadFile));
echo "S3::getObjecInfo(): Info for {$bucketName}/".baseName($uploadFile).': '.print_r($info, 1);
And it returns something like this:
S3::getObjecInfo(): Info for media...
Please bear with me, I'm trying to learn php and all about how deal with files & setup on the server side. All was fine until I recently had to switch my hosting site. This new hosting site has their url_fopen turned off.
My previous script was using:
file_get_contents ("that.htm");
but now I need to use cURL. I've figured out how to...
Hi
I am currently trying to develop an application to upload files to an Amazon S3 bucket using cURL and c++. After carefully reading the S3 developers guide I have started implementing my application using cURL and forming the Header as described by the Developers guide and after lots of trials and errors to determine the best way to c...
I'm trying to use cURL to access a secure file.. The documentation for its use is confusing so I searched and found two sites (1 & 2) and a reference here on SO but the scripts don't seem to work for me.
The site I'm am trying to access has the data I need publicly available, so I don't need to log in or provide a password.
This is the...
Hi All,
I'm using Windows on my servers.
I have to periodicly download some file to SERVER1 from FTP server. And then copy those files to shared folder on SERVER2 after downloading them.
For this job, I write a PHP script and I scheduled it with CURL within .BAT file like:
c:\curl\curl.exe http://localhost/getmyfiles.php
My script ...
I've written a shell script that has a function like this:
function getpage {
echo $1
curl -O "http://www.example.com/$1" -b cookie.txt -s
}
The problem is if the website times out then that page will be skipped, I need it to re-try if it times out (I will also be putting in a 60 second timeout).
How do I do this?
...
I need to launch curl for a test. I need to send XML which has " / and other crazy things. Whats the quickest way to do it? I tried
curl -k -d '<xs:element name="Login"/>' https://thewebsite.com/page.exe
with no luck.
...
I'm trying to do file uploads with ruby 1.8 and it seems like there are no good out-of-the-box solutions. They all seem to need some 3rd party patch or fork of a project to work. I would use mechanize but I actually need to interface with an xml api and mechanize seems to be made specifically for dealing directly with webpages. I've trie...
Hello,
I am trying to write a script that does a zip code look up at the USPS.
URL="http://zip4.usps.com/zip4/citytown_zip.jsp". The data gets submitted by POST is:
zip5=YOURZIPCODE&submit.x=3&submit.y=22&submit=Find+ZIP+Code
The part I am having a hard time finding is how these numbers get generated:
submit.x=3
submit.y=22
The above...
Hello all,
I am not well-versed in HTTP requests.
How can I, using PHP, grab and parse the information from this XML page, using a GET HTTP Request?
http://heywatch.com/encoded_video/1850189.xml
Basically, this is a video that was encoded, and I am trying to pull some of the values from the recently encoded video. More specifical...
Hello,
I wrote the class Link which has a method shortTolong() this should return the real URL for a shortend url by returning the 'location' response header. i tested it and it works OK
here is the code
public function shortTolong()
{
$urlMatch = array();
$ch = curl_init();
$options = array
(
...
Hi
I'm keeping my self busy working on app that gets a feed from twitter search API, then need to extract all the URLs from each status in the feed, and finally since lots of the URLs are shortened I'm checking the response header of each URL to get the real URL it leads to.
for a feed of 100 entries this process can be more then a minu...
Hello everybody,
I have the following php code which I found here:
function download_xml()
{
$url = 'http://tv.sygko.net/tv.xml';
$ch = curl_init($url);
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data...
I am having difficulties figuring this out. I can see i am posting XML and i see the length of it but i cannot figure out how to display or access the POST DATA
CONTENT-TYPE: text/xml<br />
CONTENT-LENGTH: 640<br />
separately i have
curl -k -H 'content-type: text/xml' -d 'XML_DATA_HERE' https://ip/page.php
...
I'm trying to authenticate to YouTube via their Data API and simply need to know how the headers should be translated from their example (below) to PHP+CURL function calls. The confusing part being the Authorization portion, which breaks name/value pairing with its own set of name and value pairs.
This documentation is all well and goo...
The below function should be outputting a Vimeo thumbnail. Its not returning anything. I have tested for $id and it is passing into the function, and it is a valid vimeo ID for a video. When I replace the $out = xxx with $out = 'hello'; , nothing comes out. This leads me to believe no records are being returned in the xml call. Curl...
I have a spooling app that sits between a Ruby on Rails app, and a few Pandastream instances. Prior to the creation of the spooling application, the Rails app posted it's file data straight to Panda without issue.
I've got the spooler receiving the file information and connection to the appropriate instance to pass the file data on, bu...
Is there any way of limiting the amount of data CURL will fetch? I'm screen scraping data off a page that is 50kb, however the data I require is in the top 1/4 of the page so I really only need to retrieve the first 10kb of the page.
I'm asking because there is a lot of data I need to monitor which results in me transferring close to...
Hi folks,
I had thought I would use curl for this but it looks like I was mistaken. What I need to do is catch a post and do some database lookups for validation purposes and then post the validated data to a remote URL.
I have done this by populating an html form and submitting it using javascript but this has obvious flaws. I want ...