guarda questo è un mini esmpio di come potrebbe essree:
Codice PHP:
<?php
require_once( 'http.inc' );
header( 'Content-Type: text/plain' );
$form = array(
'username' => 'soulhome',
'password' => 'pippofrnaco'
);
$http_client = new http( HTTP_V11, true );
$http_client->host = 's2.travian.it';
$status = $http_client->post( '/login.php', $form, 'http://s2.travian.it/login.php' );
if ( $status == HTTP_STATUS_OK ) {
print( $http_client->get_response_body() );
} else {
print( "An error occured while requesting your file !\n" );
print_r( $http_client );
}
if ( $http_client->get( '/karte.php?d=1' ) == HTTP_STATUS_OK)
print( $http_client->get_response_body() );
else
print( 'Server returned ' . $http_client->status );
$http_client->disconnect();
unset( $http_client );
?>