Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2908 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  Je ne comprends pas comment faire (Debutant)

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Je ne comprends pas comment faire (Debutant)

n°983288
Tibow
Posté le 16-02-2005 à 11:19:31  profilanswer
 

Salut tous. Voila,j'ai le script suivant, et j aimerai reussir a recuperer se que j aurai a la place de <?=$chan[1]; ?> sur une autre page.
Par exemple,si <?=$chan[1]; ?> est lemot "Coucou" reussir a avoir le mot "Coucou" qui s affichera sur la page qui sera affiché.
Voila la ligne de mon script PHP:  
<td width="15%" bgcolor="#<?=$color?>">&nbsp;<a href="chat.php?catagory=JF&room=<?=$chan[1]; ?>"><?=$chan[1]; ?></a></td>  
 
Et voici mon script complet :
 
<?  
 
/*
################ VSIRC Roomlister v1.0 ################
IRC Roomlister..
This script is created by M.Kollaard and M.D.Bakker
For information you can always send a email to:
(info@vilestyle.net) or (helpdesk@vilestyle.net)
Copyrighted (c) 2003-2008 VSNetworks©
When you modify the contents in this script
Please Add THe Copyrights Line..
Have Fun with it...
################ VSIRC ServiceBot v1.2 ################
*/
 
//set_time_limit(off);  
$botnick = "Synapse";  
$server = "e-deality.com";  
$port = "6667";  
$channel = "gn";  
?>  
<html>  
 
<head>  
<meta http-equiv="Content-Language" content="nl">  
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">  
<meta name="ProgId" content="FrontPage.Editor.Document">  
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">  
<title>New Page 1</title>  
</head>  
 
<body>  
 
<p>#<?=stripslashes($channel);?></p>  
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">  
<tr>  
<td width="8%" bgcolor="#00CCFF">&nbsp;Users:</td>  
<td width="15%" bgcolor="#00CCFF">&nbsp;Roomname:</td>  
<td width="77%" bgcolor="#00CCFF">&nbsp;Topic:</td>  
</tr>  
<?  
 
$fp = fsockopen($server, $port, $errno, $errstr, 30);  
if (!$fp) {  
echo "$errstr ($errno)<br />\n";  
} else {  
fputs($fp,"USER $botnick $botnick 127.0.0.1 :php\n" );  
$nick = $botnick . rand(10000,99999);  
fputs($fp,"NICK $nick\n" );  
while (!feof($fp)) {  
usleep(50);  
$fget = @fgets($fp, 128);  
//echo "$fget <br>\n";  
$match = explode(" ", $fget);  
$fget = ereg_replace ("\n", "", $fget);  
$fget = ereg_replace ("\r", "", $fget);  
if ($match[1] == "001" ) {  
fputs($fp,"LIST\n" );  
 
} else if ($match[0] == "PING" ) {  
fputs($fp, "PONG :" . $match[1]);  
} else if ($match[1] == "433" ) {  
$nick = $botnick . rand(10000,99999);  
fputs($fp,"NICK $nick\n" );  
} else if ($match[1] == "323" ) {  
fputs($fp, "QUIT :bye!\n" );  
break;  
} else if ($match[1] == "322" ) {  
$match[3] = ereg_replace ("#", "", $match[3]);  
if (eregi ("$channel(.*)", $match[3], $chan)) {  
$topic = explode(":", $fget);  
unset($topic[0]);  
unset($topic[1]);  
$topic = implode(":", $topic);  
$topic = explode(" ", $topic);  
unset($topic[0]);  
$topic = implode(" ", $topic);  
if ($color == "FFFFCC" ) { $color = "FFFFFF"; } else { $color = "FFFFCC"; }  
?>  
<tr>  
<td width="8%" bgcolor="#<?=$color?>">&nbsp;<?=$match[4]; ?></td>  
<td width="15%" bgcolor="#<?=$color?>">&nbsp;<a href="chat.php?catagory=JF&room=<?=$chan[1]; ?>"><?=$chan[1]; ?></a></td>  
<td width="77%" bgcolor="#<?=$color?>">&nbsp;<?=$topic;?></td>  
</tr>  
<?  
}  
}  
}  
fclose($fp);  
}  
?>
 
</table>  
 
</body>  
 
</html>  
 
 
 
Je vous remercie tous d avance.
 
Tibow


---------------
Tibow... The Only One
mood
Publicité
Posté le 16-02-2005 à 11:19:31  profilanswer
 

n°983293
esox_ch
Posté le 16-02-2005 à 11:20:50  profilanswer
 

Tu comprends le script que t'a la ? Au moins dans les grandes lignes ?


---------------
Si la vérité est découverte par quelqu'un d'autre,elle perd toujours un peu d'attrait
n°983301
soju
One shot !
Posté le 16-02-2005 à 11:23:13  profilanswer
 

ce n'est pas très clair :
- utilise le bon tag pour mettre du code,
- pas la peine de mettre tout ton script, met juste la partie interessante qui correspond à ton problème
 

Tibow a écrit :

qui s affichera sur la page qui sera affiché

:heink:  

n°983330
rompi
Posté le 16-02-2005 à 11:42:08  profilanswer
 

Citation :

Voila,j'ai le script suivant, et j aimerai reussir a recuperer se que j aurai a la place de <?=$chan[1]; ?> sur une autre page.


 
Tu peux soir te servir de la balise a,  
soit de la balise form... input
 
Commence peut être par quelque chose de plus simple si tu débutes...


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  Je ne comprends pas comment faire (Debutant)

 

Sujets relatifs
[ASPX] Question de débutant[Projet jeu JAVA] Questions de débutant
Debutant CSS definir different sytle pour des cellule de tableau ?Erreur CaML débutant.
Debutant en Flash[ DEBUTANT ] Petit problème avec PYGtk
[ASM] Problème débutantDEBUTANT aidez moi svp : compiler un fichier .jar ????
Question débutant - Optimiser type de donnée Number (Oracle)Retour d'une fonction [DEBUTANT]
Plus de sujets relatifs à : Je ne comprends pas comment faire (Debutant)


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR