<?php
error_reporting(E_ALL);
$url = 'saved_report.xml';
define('XML_HEADER', '*RWRESPONSE*RESPONSE*DATA*HEADER*COLUMN');
define('XML_ROW', '*RWRESPONSE*RESPONSE*DATA*ROW*COLUMN');
$headers = array();
$rows = array();
function startTag($parser, $data) {
global $current_tag;
$current_tag .= "*$data";
}
function endTa...
Hi, I need to send a curl request with the user's ip address not the server one. I tried this with no luck:
curl_setopt( $ch, CURLOPT_INTERFACE, $ip );
Any ideas?
Thanks!
...
I need to find the best way (in terms of performance) to find if a given string is a URL.
REGEXP won't help, as www.eeeeeeeeeeeeeee.bbbbbbbbbbbbbbbb.com is a valid url name but not in any network known to man.
I am thinking using CURL and see if I get status 200 back or just file_get_contents and analyze the result.
Is there a better way...
If anyone has any experience with the USPS delivery confirmation API, I'd really appreciate any insight I can get...
I am using PHP and cURL to send an XML request to the D.C. API. When I send the response through cURL, I get nothing. No error response, no XML, or anything. When I send the XML through a browser, I get an error respon...
Hi,
I am trying to implement a dictionary-type service.
I send a request with php using cURL to dict.org with the dict protocol.
This is my code (which on its own works and may be helpful for future readers):
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "dict://dict.org/define:(hello):english:exact");
curl_setopt($ch, CURLOPT_RETURN...
We're using Commission Junction's REST service, which requires we sent an API key in the Authorization header.
We set the header like this:
$ch = curl_init();
curl_setopt_array($ch, array(
// set url, timeouts, encoding headers etc.
CURLOPT_URL => 'https://....',
// ...
));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authoriz...
I need to make a cURL request to a https URL, but I have to go through a proxy as well. Is there some problem with doing this? I have been having so much trouble doing this with curl and php, that I tried doing it with urllib2 in Python, only to find that urllib2 cannot POST to https when going through a proxy. I haven't been able to ...
I've read through the Google Spreadsheets API PHP documentation. All examples are using Zend, which I cannot use. See this page: http://code.google.com/apis/spreadsheets/docs/1.0/developers%5Fguide%5Fphp.html
Does anybody know a simple example of the following:
How can I use PHP w/ curl (or whatever) and the Google Spreadsheets API to ...
Trying to run a cron job every few hours that reads the current Twitter Trending topics listed here:
http://search.twitter.com/trends.json
And then dump the top 10 trends into a mySQL table on my server
how to do this? thanks
...
Hi there,
I'm trying to make a post request via ajax using jQuery (for the BaseCamp API), and I can't seem to get it to work. I can get it to work using curl just fine, so I know it's something I'm doing wrong with jQuery. Here's the curl command which works:
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -u my....
I'm trying to do multiple things in curl and obviously some parameters in each step will be the same... should i use curl copy handle or curl setopt array? As far as i understand both do the same thing... or i'm getting something wrong?
...
This is driving me nuts!
I have created a query. The query is written to Windows file for future connection to the remote database.
Upon the connection using cURL, my local script uses cURL to send the query. I assemble variables using build_http_query. The cURL works just fine but the query fails. Every time. mySQL complains that qu...
I need to get a "thumbnail" of a web page which I know the url and save it to a file.
At the moment i'm stuck at "conversion" from html to image: i can get the html via curl.
How can i do to achieve this in php? It's possible?
...
I'm trying to fetch the contents of a page using CURL. The page that is doing the fetching is https and the page it is trying to fetch is also https. I'm getting an error "Couldn't resolve host" with all of the settings I try.
$c=curl_init();
curl_setopt($c, CURLOPT_URL,$url);
//curl_setopt($c, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows...
Update: The problem appears to have been corrupt DLLs somewhere in my PHP installation, or possibly a bug in PHP 5.2.9 on Win2k. I downloaded the windows (binaries-only) distribution of PHP 5.2.10 from php.net and extracted that to my c:\PHP directory. After doing that, everything worked fine.
Update2: I undid everything that I tried ...
Could any body tell me How to Enable curl in PHP
Thanks in Advance
Fero
...
Are there any alternatives to using curl on hosts that have curl disabled?
...
I'm trying to access a secure webpage on one of our servers. The webpage is inside a .htaccess protected directory that requires a username and password. I'm trying to get libcurl to submit the authentication request so it can access the file. After finding some guidance in various places, I've come up with what I believe should work,...
I would like to add some data to the body of a http request using cURL in PHP.
Is this possible? How?
I'm sending a HTTP request to a remote server. I have added all the headers I want, but now I need to add some more data to the HTTP body but I cant figure out how to do it.
It is supposed to look something like this:
Host: stacko...
This one is really racking my brain:
I need to post non-sensitive data to a third party payment gateway. I want to use the built in cakephp form validation which is working fine.
What i am doing is submitting the form to a local action which calidates the data and outputs any errors if there are any. Where i am stuck is trying to re-sub...