Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/08/2003, 07:53
Avatar de mc
mc
 
Fecha de Ingreso: abril-2002
Ubicación: En un lugar de tu imaginación, en busca del arte perdido.
Mensajes: 644
Antigüedad: 22 años
Puntos: 1
LibroVisitasFlashPHP descargatelo.

Como parece que no hay mucho material disponible de Flash y PHP, pongo a disposición del que quiera este libro de visitas, que he adaptado y funciona perfectamente en español.

El codigo del PHP:

<?php
if (isset($submit)){
if ($submit=="Y"){
$datestamp =(date ("dS F Y ( h:i:s A )",time()));
$fpn=@fopen("guestbook.txt","r+");
@flock ($fpn,2);
$rec = "Name: $txtname<br>Email: <u><a href=\"mailto:$txtemail\">$txtemail</a></u><br>Website: <u><a href=\"$txtwebsite\" target=\"_blank\">$txtwebsite</a></u><br>Comments: $txtcomments<br><i>Posted on: $datestamp" . "\n";
$fw=fwrite($fpn,$rec);
@flock($fpn,3);
@fclose($fpn);
}
}
$fp=@fopen("guestbook.txt","r");
@flock ($fp,2);
$garr=array();
while ($line=@fgets($fp,1024)){
array_push($garr,$line);
}
$totalent=count($garr)-1;
if ($totalent<0){
$totalent=0;
}
if($highlimit>$totalent){
$highlimit=$totalent;
}
print "&txtll=$lowlimit&txthl=$highlimit&totalentries=$t otalent&txtmain=" ;
if (count($garr)==0){
print "<br><br><b> :::: Nothing to display :::: </b>";
exit();
}
$ar=array_reverse($garr);
$garr=array();
for($i=$lowlimit;$i<=$highlimit;$i++){

if (!$ar[$i]) {
print "<br><br><b>::: Nothing Below This :::</b>";
exit;
}
print $ar[$i];
print "<br>";
}
@flock($fp,3);
@fclose($fp);
?>

Y el del Flash:

System.useCodePage = true;
stop();
lowlimit = 0;
highlimit = 10;
loadVariables("guestbook.php?lowlimit="+lowlimit+" &highlimit="+highlimit, this);
stop();

Descargate los archivos:
www.hipnodream.com\libroVisitas\libroVisitas.zip