Hi all,
I have a PHP routine that I call shell_exec to traverse my own website and build an index.
However since I do this multi-threaded I have been running into problems with memory storage...server memory spikes to 250MB then back down to 100MB randomly.
I am constantly accessing the mysql database during this time; and the php sl...
Hello,
I'm trying to use libcurl with a program I'm making, but I'm having some problems with it. So far I've only tried the examples from libcurl's website, but they crash as soon as the program gets to the curl initialization.
My current code:
#include <iostream>
#include <curl/curl.h>
int main(int argc, char *argv[])
{
CURL *c...
Using cURL with an accented URL, I cannot get content if CURLOPT_RETURNTRANSFER = true.
Example:
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://fr.wikipedia.org/wiki/Été");
curl_setopt ($curl, CURLOPT_RETURNTRANSFER, true);
$html = curl_exec ($curl);
echo $html;
$html is empty, does someone have a solution ?
...
Hi,
I'm trying to get information from a site by parsing/scraping it via PHP & Curl. But sometimes the current page doesn't finish loading, so the script runs without anything happening. It's a simple script like this...
...
curl_setopt($curl, CURLOPT_URL, $url);
$page = curl_exec($curl);
...
Is there a way to simply retry the loa...
I've been working with php curl to create a login script for my school's network, but I've hit a snag. I got my script to login, but the home page is made up of frames. The content isn't showing up for either frame, saying the url was not found on the server. The urls for each of the frames are relative, so the browser is looking on my s...
In linux machine,Using cURL, I'm trying to upload a text file to a asp.net site. I'm new to cURL.
My Source code...
Upload.aspx
<%@ Page Language="C#" AutoEventWireUp="false" CodeFile="Upload.aspx.cs" Inherits="Upload" EnableViewStateMac="false" EnableSessionState="false" EnableViewState="false" %>
<html>
<head> </head>
<body>...
I wanted to get some thoughts on selling a PHP application (CMS). I intend on offering a free version that may include ads or be limited in some way. My main concern is how to detect if the user has purchased a license or the paid version or not.
My idea is to have a file (license.php) which will check a variable against one on my datab...
Hello All,
So here is my problem in a nut shell. I'm working on a web scraping app for work and I've ran into a snag. I'm trying to load the HTML markup of a site using CURL, then use DOMDocument and XPath to find specific node values from that HTML.
Initially, the user plugs in a URL which displays information they want to pull out o...
Error is "Could not resolve host: (hostname); Host not found."
This randomly started happening again on my development computer. It works fine on the production server, so whatever. But I still need to test this here. Here's the code:
function useCurl($xml,$cert,$host){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$host);
curl_setop...
In PHP, I use CURL to send a .PEM formatted certificate to a remote host. For example:
curl_setopt($curl, CURLOPT_SSLCERT, '/path/to/file.pem');
How can I do this in Java?
...
Hi,
I'm using the Gowalla API to log a user into my site. I've got everything working except for the part below using the OAuth login. I'd like to integrate this into my php site as easily as possible. I.e just make a simple function call from php that can retrieve the data.
The examples I found on php.net don't cover thee types of c...
I'm writing a specialized PHP proxy and got stumped by a feature of cURL.
If the following values are set:
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt( $ch, CURLOPT_HEADER, true );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
cURL correctly handles redirects, but returns ALL page headers, not just the final (no...
Hi,
I'm trying to login to a remote site called Lectio. The site sets six cookies on your computer when you visit it. When I try to log in with cURL, I only get two cookies.
Three of these six cookies should be set even when entering the site and not logging in. I get two of these cookies. I guess the last one is set through JavaScript...
I am trying to learn to use PHP curl and it seemed to go well until I have tried to authenticate to changeip.com. Here is the function I use to make a Curl call:
function request($ch, $url, $params = array())
{
$options = array
(
CURLOPT_URL => $url,
CURLOPT_USERAGENT => 'M...
I'm executing a curl command from php in background,
that uses curl_exec to retrieve some data and something is wrong...
when i try to pass post data to curl_exec script:
exec('curl --data "'.$post_string.'" '.$post_url);
all fine, i get a 200 response, script finishes successfully
same command, but with "> /dev/null &":
exec('cur...
I've verified that $requestDom->saveXml() is returning valid XML but at the destination URL I have print_r($_POST) and it doesn't receive anything. Am I missing something here? :-\
$connection = curl_init();
curl_setopt($connection, CURLOPT_POSTFIELDS, array(
'xml' => $requestDom->saveXml()
));
curl_setopt($conn...
Is there a way to get the host name using CURL, or what is the preferred way using PHP?
...
Hey,
So I have my email on a site w/ cpanel and my support site currently running locally. I've set up a forwarder to automail.php which triggers correctly. Here is the code:
#!/usr/bin/php -q
<?php
try {
#pre-checks
function_exists('file_get_contents') or die('upgrade php >=4.3');
set_time_limit(30);
#Configuration: Enter the url ...
Hello
Is it possible to manipulate a dovcot server or any like server with CURL to return email for an email address?
I've been unsuccessful with imap_open and am in need of a new alternative.
I've been able to login using CURL but after that I do not know where to go. This is what is outputted after login:
+OK Dovecot ready. -ERR Un...
Folks
I have an image at some server (SOURCE)
i.e. http://stagging-school-images.s3.amazonaws.com/2274928daf974332ed4e69fddc7a342e.jpg
Now I want to upload it to somewhere else (DESTINATION)
i.e. example.mysite.com/receiveImage.php
First, I am copying image from source to my local server and then uploading it to destination.
It's perf...