I read that spammers may be downloading a specific registration page on my site using curl. Is there any way to block that specific page from being CURLed, either through htaccess or other means?
...
Hello all!
I'm new here. I've got a question related to PHP, FTP and CURL.
I need to emulate PHP's stat() with CURL FTP. I already know that it may take more than one command to do it. Here's what I've got so far (PHP/STAT ... FTP/CURL):
dev
ino
mode ... LIST *
nlink
uid ... LIST *
gid ... LIST *
rdev
size ... SIZE (or better still, ...
I have a cURL call that I use in PHP:
curl -i -H 'Accept: application/xml' -u login:key "https://app.streamsend.com/emails"
I need a way to do the same thing in Python. Is there an alternative to cURL in Python. I know of urllib but I'm a Python noob and have no idea how to use it.
...
I can't figure out how to use CURL's FTP, specifically, how to issue FTP commands from my PHP code:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'ftp://ftp.microsoft.com/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTQUOTE,array('CWD bussys/','LIST')); /* ?!! */
echo '<hr>...
Hi, is it possible to use curl or other means to set a cookie on another domain? I have access to the php file on the other domain that can set the cookie but I do not know how to access that php file using curl and then set the cookie.
...
I want to scrap mail ids from a page and have got a script which is running in most sites. But in some sites they are loading mail ids with javascript so curl cant able to load the contents of the page with mail ids. i mean here
http://www.everynation.org/churches/church-directory/africa/zambia
Here they are loading mailids with java...
Hi folks,
I'm finding it to install pycurl on CentOS 5 quite the mission impossible.
This is the error I'm getting:
>>> import pycurl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libcurl.so.4: cannot open shared object file: No such file or directory
Some help would be beyond amazing. :|
...
So I'm not a very good network person so I was hoping someone could point me in the right direction to figuring out what I am doing wrong.
I am trying to use curl to post a SOAP message. I am running the following:
curl -d "string of xml message" -H "Content-Type:text/xml; charset=utf-8" "[ip]:[port]/[service]"
This results in a 'Con...
Basically, I have multiple URL's stored in a MySQL table. I want to pull those URLs from the table and have cURL connect to all of them. Currently I've been storing the URL's in the local script, but I've added a new page that I can add and remove them from the database, and I'd like the page to reflect it appropriately.
Here is what I ...
Im wondering what affect loading an external page with php has on a sites analytics. If php is loading an external page, and not an actual browser, will the javascript that reports back to google analytics register the page load as a hit?
...
I am attempting to build a script that will log data that changes every 1 second. The initial thought was "Just run a php file that does a cURL every second from cron" -- but I have a very strong feeling that this isn't the right way to go about it.
Here are my specifications:
There are currently 10 sites I need to gather data from and ...
i have a code to send a Form Post with login credentials to a webpage. it looks like this
CURL *curl;
CURLcode res;
struct curl_httppost *formpost=NULL;
struct curl_httppost *lastptr=NULL;
struct curl_slist *headerlist=NULL;
static const char buf[] = "Expect:";
curl_global_init(CURL_GLOBAL_ALL);
/* Fill in the username ...
Hello Guys,
In the old way in our website, when users clicks “logout” button. It runs a post form function; which will pass parameters (logout, sn) to external sites to execute “logout” function.
Like:
I do not want the users jump to the external site, therefore, i use curl to post data. (because...
NOTE: I fixed the user agent problem and i also added in an extra byte to match the content length. No luck however.
I dont understand this. I ran this code below and the result json string was the link is expired (meaning invalid).
However the curl code does the exact same thing and works. I either get the expected string with the url...
Here is my current code:
$SQL = mysql_query("SELECT url FROM urls") or die(mysql_error()); //Query the urls table
while($resultSet = mysql_fetch_array($SQL)){ //Put all the urls into one variable
// Now for some cURL to run it.
$ch = curl_init($resultSet['url']); //load the urls
curl_setopt($...
I'm using the code from the example titled "A Slightly Bigger Example" from this tutorial http://rubylearning.com/blog/2009/09/30/cookie-based-sessions-in-sinatra/ to figure out how to send a cookie to a Sinatra application but I can't figure out how to set the values correctly
When I set the name to be "brandon" in the application it c...
I understand that I can set the option on any specific instance, however what I would really like is to set something up php.ini or somewhere similar which will handle this across all projects and all instances.
Does anyone know a way for me to accomplish this?
EDIT:
I am particularly interested in a solution which will allow for the c...
Hello. I've used code below to send XML to my REST API. $xml_string_data contains proper XML, and it is passed well to mypi.php:
//set POST variables
$url = 'http://www.server.cu/mypi.php';
$fields = array(
'data'=>urlencode($xml_string_data)
);
//url-ify the data for the POST
$fields_st...
This question relates to the command line version of cURL.
I'm trying to download a file from a cgi script.
http://someserver/perl/dl.pl?ID=2
Using a browser the filename comes up as 'remotefilename.gz'
cURL wants to save the file as 'dl.pl?ID=2'
How do I get cURL to save to a file with the filename from the response header??
...
I have written a Perl script that runs as a daily crontab job that uploads files to Amazon S3 via CURL. I want the output of the cron job emailed to me which works fine but I don't want that email to include messages related to the CURL upload (only those message my script is outputting). Here are the CURL related messages I'm seeing in ...