I have no idea where to begin - my web host does not allow fopen, but my geocoding script below uses it. So, since no fopen - no lat & long - so no google maps on my pages.
Can anyone redo this in curl?
http://paste.ly/4HU (since the code is breaking up below)
$mapaddress=str_replace(' ', '%20', $_REQUEST['street_num'] . ' ' . $_R...
the api I'm working with is here:
I'm able to log in fine and get back an auth token, but cant figure out how to do anything that requires a token. I get back a forbidden response when I try to get or post a private URL.
they give an example of the request that needs to be sent using curl:
curl \
--header 'Authorization: User...
I'm following this tutorial to access the del.icio.us api, but this is my first time using cURL or OAuth so hitting a few snags.
I'm using the following code
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.login.yahoo.com/oauth/v2/get_request_token?oauth_nonce=123456789&oauth_timestamp="+$timestamp+"&oauth_co...
Hi,
I download a file with cURL using option CURLOPT_FILE and then try to rename the downloaded file, for example, from "1.txt" to "2.txt". It fails to rename the file.
PHP throws an error:
"Warning: rename(E:\.../test/1.txt,E:\.../test/2.txt) [function.rename]: No such file or directory in E:\.../test\lib\CURL\Download.php on li...
Well, here's the code:
<?
// Getting the comic page
if (!empty($_GET['c'])) $id = $_GET['c'];
else $id = "new";
$url = "http://www.explosm.net/comics/$id/";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_FAILONERROR, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT...
I'm trying to make cURL post to this page the data txt_code=1605120090100999. Can anyone show me the PHP code that posts that value to that page and gives me the result as output?
I tried this:
$url = 'http://195.246.54.62/support/mis_support.aspx';
$txt_code = '1605120090100999';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url)...
I'm trying to write a simple bash script that accepts all arguments and interprets them simply as a string.
In other words:
tweet Testing out my command-line tweetings. #commandlinetweets
Takes in all the arguments and just uses them bluntly as a string.
Here is the basic form that I have at the moment:
function tweet()
{
echo "Twee...
Using Apache or Ngnix I always create development sites based on real projects such as http://project1.loc which, after adding to my .hosts file, the browser has no problem using.
However, when I attempt to make a cURL request (http://project1.loc/post.json) to that same URL I never get anything but a timeout. I'm assuming cURL doesn't ...
Hello!
I want to write a shell script to get an image from an rss feed.
Right now I have:
curl http://foo.com/rss.xml | grep -E '<img src="http://www.foo.com/full/' | head -1 | sed -e 's/<img src="//' -e 's/" alt=""//' -e 's/width="400"//' -e 's/ height="400" \/>//' | sed 's/ //g'
This I use to grab the first occurence of an image UR...
i made a script to post comments on a page. I have used php curl and it works. but i need to use ajax so the page doesn't reload. But when i use jquery post the response says: method not allowed use post or get.
this the codes:
include("userinfo.php");
if ($_POST['action'] === 'postcomment'){
$imageid = $_POST['imageid'];
$user = ...
I'm trying something new, I would normally do this in C# or VB. But for speed reason I'd like to do this on my server.
Open File terms.txt
Take each item one at a time from terms.txt and open a url (possibly curl or something else) and go to http://system.com/set=terms
View the HTML source and extract pic names (stringB). Look for ima...
Hi
I am trying to crawl the apple itunes website. I am getting output in binary format.
For example
curl -A "mozilla/5.0" http://itunes.apple.com/us/app/the-far-islands-by-john-buchan/id327765949?mt=8
returns binary.
Can anybody please tell me what i am missing?
Thanks
...
Which library/module is the best to use for downloading large 500mb+ files in terms of speed, memory, cpu? I was also contemplating using pycurl.
...
In .NET you have the handy
System.Net.CredentialCache.DefaultCredentials
to set all your needed proxy data to the default values of the system.
How can i do something similar in native C++? I need the proxy address, username and password. Our project uses MFC and cURL
...
Hi
The following is part of a script which is used to authenticate paypal payments.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://' . $server . '/cgi-bin/webscr');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOP...
<?php function curl($mail){
$go = curl_init();
$access_token = '1234567890|5fabcd37ef194fee-1752237355|JrG_CsXLkjhcQ_LeYPU.';
curl_setopt($go, CURLOPT_URL,'https://graph.facebook.com/search?q='.$mail.'&type=user&access_token='.$access_token);
curl_setopt($go, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows N...
Ok, let's suppose we have a form which allows people to post their comments. As you know, "bad people" can spam me with help of PHP Curl easily. How can I protect my website against that not including captcha? Thank you.
...
I am "playing" with an idea, but it might use curl which I am not too sure about, but can fathom my way round most. I can curl a page and get the contents - that's OK, but can you curl a page and get "specific" contents say a variable string or array? Reason for asking is I do a lot of updating to a few sites but most of that is "commo...
I have a quite simple task:
i need to download file from a web page. In browser, it is done by pressing submit button. Just simple button, press it and you see the pop-up window asking where to save file and so on. Data is sent to server via post method.
I tried POST'ing with curl like: curl -d "foo=bar&....." [URL]
but this request re...
Although "slightly" related to a previous question, it is different. How "secure" is this code in terms of cURL? Are there any other "bits" that should/ought to be added. Note it is not being used to pass "sensitive" info.
$ch = curl_init("http://www.example.com/test.xml");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch...