I am using this class to make one GET and another POST request to a website (the first request is to set a cookie). I am testing in a Win XP virtual machine with virtualbox, using wamp from wampserver dot com. The 2 requests takes from 10 to 18 seconds (with curl), but if I make those request directly via the webbrowser in that same virt...
Hi I'm creating a PHP fucntion to connect to pingomatic using CURL but the response is always.
Array ( [EXE] => XML-RPC server accepts POST requests only. )
here is my sample code...
function curl_getpage2($url,$data, $referer = null, $agent = null, $header = null, $timeout = 20, $proxy = null, $proxy_username = null, $proxy_password...
Hi,
I've seen this asked in several ways but can't find an answer that works.
I've created a page that logs into a remote .NET-based site using PHP/cURL. Works great as far as it goes -- I can get the data back from the logged-in page via curl_exec and do whatever with it but what I really need to do is to redirect the user to that ...
I'm trying to download some remote pages. In the source code there is a very long line. Both curl and wget download the file but decide to miss out this one line. Is there another command line utility I can use and/or does anyone know how I can fix this problem.
Edit:
Can I clarify, I have tried with wget and curl and both files miss th...
I have a form (Code Below) that will collect an email address and what I want is that it will then pass the collected email address to the next page to say something like "We have sent the information to [email protected]"
So page 1 will contain the form and will pass the email address to page 2
<form method="post" class="af-form-wrapper...
I'm trying to pass some info to an ASP webpage.
The form on the page looks as following:
<form name=onlineform method=post onSubmit="javascript:return false;">
<input type=hidden name="form" value="">
<textarea name=item rows=5 cols=33 onBlur="this.value=removeSpaces(this.value);" tabindex="1"></textarea>
<input type="text" name="Email...
What does curl_multi_getcontent($ch) return if $ch isn't ready in PHP?
...
Basically, I'm trying to log into a site. I've got it logging in, but the site redirects to another part of the site, and upon doing so, it redirects my browser as well.
For example:
It successfully logs into http://example.com/login.php
But then my browser goes to http://mysite.com/site.php?page=loggedin
I just want it to return the...
Okay, I'm pretty new to cURL. I've managed to log into a webpage using cURL and sending POST data, but once I'm logged in, I'd like it to load various webpages under the same SESSION and extract data as a string, so that I can check if the webpage contains a specific string.
How would I go about doing this?
For example:
It logs into h...
Hi,
I am using curl, I am wondering how would I send post/submit data on my page to those websites? The web site has "host, time, port". My MYSQL database has a list of urls. I was thinking of curl_multi but I am not sure.
Please someone post examples. It has to be a fast method.
Basically feteches the url and post.
while($resultSet =...
Hi,
Here is my structure:
MYSQL: Table: toys ---> Column: id, URL. How do I get my PHP script to check all of those URLs to see if they are alive or have page 404's? Try not to echo or diplay the results on page. I will need to to record in MYSQL with a extra column "checks".
Results will be in this format:
http://asdasd.adas --- up ...
I will have an app where I will prompt users for a URL (with proper regex url validation) and return the page with cURL and run some checks on it.
What would be the most secure way of returning a remote webpage securely with cURL? As I understand even cURL has some vulnerabilities, like 'safe mode' Security Bypass (http://www.securityfo...
Hey everyone,
This question sort of covers both ServerFault.com and here, but this seems more programming than server. I set up my home computer to run Apache server. It answers to port 5900, which has been port forwarded from my wireless router. I then set up a Dynamic DNS server to continually update what the IP address of my home ...
I've been working on a script that can be used for an internal wiki, that will remove the properties for a user who is inactive. I believe I'm almost there but having a problem with the api.
I think I need to use urlencode on the $delete path BUT only for the @ in the email address and # in the property. I know how to use urlencode for...
I have a PHP CURL query which is of the form
curl -u emailid:password -H "Content-Type: application/xml" -d "[email protected] Details" -X POST http://url/xxx.xml
The query works fine for all email addresses except those that have &, ? or . where I get an xml query format error.
When I replace & with & the & problem is solved...
I'm using Drush and Drush Make to automate download of Drupal module from a corporate network behind a NTLM-SSPI Proxy. Drush and Drush Make uses cURL to download files. cURL supports NTLM-SSPI Proxy. I configured cURL for the proxy in my .curlrc file
--proxy proxy.example.com:8080
--proxy-ntlm
--proxy-user user:password
Drush itself ...
URL:
http://en.wikipedia.org/w/api.php?action=parse&prop=text&page=Lost_(TV_series)&format=xml
this outputs something like:
<api><parse><text xml:space="preserve">text...</text></parse></api>
how do i get just the content between <text xml:space="preserve"> and </text>?
i used curl to fetch all the content from this ur...
This is my code:
$url = 'http://www.douban.com/';
$url = str_replace(" ", "%20", $url);
$TheURL_header = substr($url, 0, 7);
if ($TheURL_header == "http://") {
$pos = strpos($url, "/", 7);
if ($pos) {
$host = substr($url, 7, $pos - 7);
} else {
$host = substr($url, 7);
}
$referer = "http://" . $host...
How does one upload a file to another website by using Curl in PHP and get the response page?
The website: http://www.postto.me
<form action="posttome.php" enctype="multipart/form-data" method="post">
<input type="hidden" value="2097152" name="MAX_FILE_SIZE">
<input type="file" size="30" class="input" name="img">
<input type="submit" c...
$ch = curl_init();
$data = array('name' => 'img', 'file' => $_FILES["img"]["tmp_name"].".png");
curl_setopt($ch, CURLOPT_URL, 'http://www.postto.me/upload.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
and...