Newsgroup: it.comp.www.php
Titolo: Login ad un altro sito via Php

proxy);
		curl_setopt($process, CURLOPT_POSTFIELDS, $data);
		curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
		curl_setopt($process, CURLOPT_POST, 1);
		$return = curl_exec($process);
		//var_dump(curl_getinfo($process,CURLINFO_HEADER_OUT));
		curl_close($process);
		return $return;
	}
	function error($error) {
		echo "<center><div style='width:500px;border: 3px solid #FFEEFF;
padding: 3px; background-color: #FFDDFF;font-family: verdana; font-
size: 10px'><b>cURL Error</b><br>$error</div></center>";
		die;
	}
}
$cc = new cURL();
$cc->get('
http://admin.comunicati-stampa.net/login.htm'
);
echo $cc->post('
http://admin.comunicati-stampa.net/
index_html','do_login=1&user=utente&password=pwd&Submit=%3A%3A%3A
+Accedi+%3A%3A%3A');

 vengono generati dal browser) e il login fallisce.
visto che mi fa fatica controllare il tuo listato, ti posto una funzione
della libreria che uso io per fare questo tipo di azioni, magari di manca
qualche opzion curl (snoopy non lo conosco):
#!/usr/bin/php
<?php
# Length of time cURL will wait for a response (seconds)
define("CURL_TIMEOUT", 25);
# DEFINE METHOD CONSTANTS
define("HEAD", "HEAD");
define("GET",  "GET");
define("POST", "POST");
# DEFINE HEADER INCLUSION
define("EXCL_HEAD", FALSE);
define("INCL_HEAD", TRUE);
function http($target, $ref, $method, $data_array, $incl_head)
{
# Initialize PHP/CURL handle
$ch = curl_init();
	# Prcess data, if presented
	if(is_array($data_array))
	{
		# Convert data array into a query string (ie animal=dog&sport=baseball)
		foreach ($data_array as $key => $value) 
		{
			if(strlen(trim($value))>0)
				$temp_string[] = $key . "=" . urlencode($value);
			else
				$temp_string[] = $key;
		}
		$query_string = join('&', $temp_string);
	}
	# HEAD method configuration
	if($method == HEAD)
	{
		curl_setopt($ch, CURLOPT_HEADER, TRUE);                // No http head
		curl_setopt($ch, CURLOPT_NOBODY, TRUE);                // Return body
	}
	else
	{
		# GET method configuration
		if($method == GET)
		{
			if(isset($query_string))
				$target = $target . "?" . $query_string;
				curl_setopt ($ch, CURLOPT_HTTPGET, TRUE); 
				curl_setopt ($ch, CURLOPT_POST, FALSE); 
		}
		# POST method configuration
		if($method == POST)
		{
			if(isset($query_string))
				curl_setopt ($ch, CURLOPT_POSTFIELDS, $query_string);
			curl_setopt ($ch, CURLOPT_POST, TRUE); 
			curl_setopt ($ch, CURLOPT_HTTPGET, FALSE); 
		}
		curl_setopt($ch, CURLOPT_HEADER, $incl_head);   // Include head as needed
		curl_setopt($ch, CURLOPT_NOBODY, FALSE);        // Return body
	}
	curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIE_FILE);   // Cookie management.
	curl_setopt($ch, CURLOPT_COOKIEFILE, COOKIE_FILE);
	curl_setopt($ch, CURLOPT_TIMEOUT, CURL_TIMEOUT);    // Timeout
	curl_setopt($ch, CURLOPT_USERAGENT, WEBBOT_NAME);   // Webbot name
	curl_setopt($ch, CURLOPT_URL, $target);             // Target site
	curl_setopt($ch, CURLOPT_REFERER, $ref);            // Referer value
	curl_setopt($ch, CURLOPT_VERBOSE, FALSE);           // Minimize logs
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);    // No certificate
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);     // Follow redirects
	curl_setopt($ch, CURLOPT_MAXREDIRS, 4);             // Limit redirections to four
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);     // Return in string
	# Create return array
	$return_array['FILE']   = curl_exec($ch); 
	$return_array['STATUS'] = curl_getinfo($ch);
	$return_array['ERROR']  = curl_error($ch);
	# Close PHP/CURL handle
	curl_close($ch);
	# Return results
	return $return_array;
}
$method="POST";
$action='
http://admin.comunicati-stampa.net/index_html
';
$referer="
http://admin.comunicati-stampa.net/login.htm
";
$data['do_login']="1";
$data['user']="username";
$data['password']="pwd";
$data['submit']="::: Accedi :::";
$response= http($action,$referer,$method,$data,EXCL_HEAD);
var_dump($response);