Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/02/2010, 12:27
Avatar de jokerwin
jokerwin
 
Fecha de Ingreso: febrero-2010
Ubicación: Argentina
Mensajes: 31
Antigüedad: 14 años, 2 meses
Puntos: 2
Exclamación Crear una lista de web que utilizen mi script

Buenas.. yo tengo mi script modificado profundamente smf.. y quisiera compartirlo gratuitamente, pero quiero q al instalar el script mediante el archivo install.php me envie la direccion de la web creada a cierta direccion asi tendria un log de webs creadas con mi script..

Adjunto el install.php

mediafire.com/download.php?jzgawvnfmw3

Cita:
Aca dejo el codigo del install que hace enviar la direccion de la web creada a simplemachines.org:

// Are we allowing stat collection?
if (isset($_POST['stats']) && substr($_POST['boardurl'], 0, 16) != 'http://localhost')
{
// Attempt to register the site etc.
$fp = @fsockopen("www.simplemachines.org", 80, $errno, $errstr);
if ($fp)
{
$out = "GET /smf/stats/register_stats.php?site=" . base64_encode($_POST['boardurl']) . " HTTP/1.1\r\n";
$out .= "Host: www.simplemachines.org\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);

$return_data = '';
while (!feof($fp))
$return_data .= fgets($fp, 128);

fclose($fp);

// Get the unique site ID.
preg_match('~SITE-ID:\s(\w{10})~', $return_data, $ID);

if (!empty($ID[1]))
mysql_query("
INSERT INTO {$db_prefix}settings
(variable, value)
VALUES
('allow_sm_stats', '$ID[1]')");
}
}
Cita:
Y aca dejo otro q funciona y es mas sencillo:

$fp = @fsockopen("algunaweb.com", 80, $errno, $errstr);

if ($fp)

{
$out = "GET /versiones/indexs.php?site=" . $_POST['boardurl'] . " HTTP/1.1\r\n";
$out .= "Host: cualquierweb.com\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
$return_data = '';
while (!feof($fp))
$return_data .= fgets($fp, 128);
fclose($fp);
}

Espero q se haya entendido y me puedan ayudar