I am trying to create a simple alert app for some friends.
Basically i want to be able to extract data "price" and "stock availability" from a webpage like the folowing two:
http://www.sparkfun.com/commerce/product_info.php?products_id=5
http://www.sparkfun.com/commerce/product_info.php?products_id=9279
I have made the alert ...
<?
$request_url = 'http://www.betjamaica.com/livelines2008/lines.asmx/Load_Latest_Lines?SportType=Football&SportSubType=NFL&GameType=GAME';
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exe...
I've got an html form that submits via AJAX (jquery Form Plugin) to a PHP Web Proxy on my server. The web proxy uses curl to POST to a third party script.
My html form has inputs with names like p[fname], p[lname], c[name], p[loc], p[loc][email], p[loc][email][detail]. The names are specified by the third party application.
When I use ...
I'm using commandline curl to do a POST via a proxy but my form data is vanishing to zero content length. Any ideas what I'm doing wrong?
Here's my command line (uses a public test form so others can try it):
curl -v --proxy-ntlm --proxy proxyserver:proxyport --proxy-user : -d "fname=a&lname=b" http://www.snee.com/xml/crud/posttest.cgi...
I've been debugging some Soap requests we are making between two servers on the same VLAN. The app on one server is written in PHP, the app on the other is written in Java. I can control and make changes to the PHP code, but I can't affect the Java server. The PHP app forms the XML using the DOMDocument objects, then sends the request us...
Is it possible to partially download a remote file with cURL?
Let's say, the actual filesize of remove file is 1000 KB.
How can I download only first 500 KB of it?
...
Hi..
Got a Curl question (and yeah, i've searched Google, this site, as well as the docs!!)
Somewhat new to curl. Trying to use Curl from the cmdline (linux) to fetch pages from a college website (sjsu). I can somewhat get the 1st page, but the 2nd/2rd pages use referers/cookies.. I think this is where things are screwed up..
I'm also...
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a different discussion. Here's the code:
shell_exec("nohup curl --create-dirs -o {$write_path} {$source_url} > /dev/null 2> /dev/null & echo $!");
sleep(1);
$read_speed = 65.5; # 65.5 kb/s download rate
$handle = fopen($wri...
Why does this code hang? Comment out the break statement and it works fine, but only for the first item in the $sitelist array.
I know about PHP curl's multisite feature, but I am not interested in fetching files in parallel.
Code snippet:
$sitelist = array(11204,11509,20602,21601,22003,22704,23106,23303,23402,23422,23427,30215,30220...
Hello, I am trying to login to a system (which happens to be using the SquirrelMail client) using CURL and I'm having trouble.
Here is my relevant PHP code:
$handle = curl_init();
curl_setopt($handle, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($h...
I've got something like the following lines of PHP code (on IIS):
$service_url = 'http://some-restful-client/';
$curl = curl_init($service_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$curl_response = @curl_exec($curl);
curl_close($curl);
When executing this I get the following exception
PHP has encountered an Access Vio...
Here's the code in question:
#!/usr/bin/python
import pycurl
c = pycurl.Curl()
values = [
("key", "YOUR_API_KEY"),
("image", (c.FORM_FILE, "file.png"))]
# OR: ("image", "http://example.com/example.jpg"))]
c.setopt(c.URL, "http://imgur.com/api/upload.xml")
c.setopt(c.HTTPPOST, values)
c.perform()
c.close()
I...
When a server allows access via Basic HTTP Authentication, what is the experience expected to be on the browser?
I typically just do this with curl:
curl -u myusername:mypassword http://somesite.com
And it works just fine. However, right now I don't have access to curl (long story), and I want to just do it from the web browser, if p...
I'm using Eclipse and XDebug to develop a PHP application that relies on web services.
I have test pages that consume my services in 2 ways: AJAX (using jQuery) and cURL.
I add breakpoints to my service page and launch the debugger. When I call the the service from AJAX, execution stops nicely at the breakpoint, and I get my variables, ...
Hi everyone
I have a script where I have to download some files and to make sure that everything worked fine I'm comparing MD5 checksums.
I have found that the checksums are not correct when downloading with CURL. The script below demonstrates this. It downloads the Google logo and compares checksums.
$url = 'http://www.google.com/in...
How to pass additional parameters to this twitter update api by using curl from terminal?
http://twitter.com/statuses/update.xml
Say I need to pass replyto user id as given in the documentation. Although I could simply append @username before the message, I need user id based and @user_id didn't work.
...
I'm trying to make a widget for my home page which will automatically pull from a yammer feed, much like a desktop client, using cURL (PHP). I can't find any examples anywhere, though. Has anyone managed to get through OAuth verification this way?
...
The following statement works as expected:
os.system("curl --data-binary \@"+input_file_path+" -o "+ file_name +" localhost:30")
But when trying it with subprocess.popen:
Popen(['curl','--data-binary','\@'+input_file_path, '-o', file_name,'localhost:30'], stdout=PIPE).communicate()[0]
Curl seems to hang up(logs into endless loop), ...
I'm wanting to setup a php script and host it on my server that will let me download files from other locations, but making it look like it's coming from my server. Maybe using curl or htacess. Also I was hoping that there would be a way to get around having my server deal with the bandwidth. Does that make sense? Is this doable?
--...
I'm pretty sure there's a way to use curl in php to make a proxy server so my question is more, will that use my bandwidth? if there is a way to have it not use my bandwidth how would that look?
...