Bonjour a tous ! Je suis en train de monter mon site ( http://simcityworld.free.fr/PC-ASTUCES/ )
je voudrais faire une partie "outils". le visiteur pour tester sa bande passante, voir sa vitesse de connexion, voir son IP...
Seul probleme, je ne sais pas du tout ou trouver les scipt permettant ceci...
Je suis en HTML. Si quelq´un a ces scripts merci de me les donner !
merci bcp !
Et bien il me semble qu´il te faille faire une page en PHP pour déja supporter cela (ou en js mais j´en doute).
tu doi passer en php et après il suffit d´intégrer ce bout de code dans ton fichié html :
<? $ip=$_SERVER[´REMOTE_ADDR´];
echo ´Votre adresse ip est : ´.$ip.´ .´ ; ?>
PS: les " " corespondent à des espaces
je peux mettre un lien vers une page PHP sur une page en HTML ?
je peux utiliser mon kit graphique (html) en PHP ?
merci
bien sur bien sur. Une page php ne diffère d´une page html que par le fait que ton serveur va vérifier qu´il n´y pas de code à éxecuté (en php sa va de soi ^^)et s´il y en a un il l´éxécute et donne le résultat en html. Donc tu peux même intégrer le petit script que je t´ai donné dans une page html mais il faut que tu change l´extension en .php . Pour le lien y a aucun prob
j´ai mis ça sous Dreamweaver (le code que tu m´a filer est ver la ligne 118) :
<!--
KIT GRAPHIQUE PAR K-NETWORK
http://www.k-network.com
TELECHARGE SUR KITGRAFIK
http://www.kitgrafik.com
-->
<!-- DEBUT HEADER -->
<HTML>
<!-- DATE DE CREATION: 06/02/2003 -->
<HEAD>
<TITLE>PC-ASTUCES simcityworld.free.fr</TITLE>
<META NAME="Author" CONTENT="k.network pour kitgrafik.com">
<STYLE TYPE=text/css>
.texte, TD { font-family:Verdana;font-size:11px;color:white }
.menu { font-family:Verdana;font-size:12px;color:black }
.titre { font-family:Verdana;font-size:20px;color:white }
A.menu {
font-family:Verdana;font-size:11px;color:black;tex
t-decoration:none }
A:hover.menu { font-family:Verdana;font-size:11px;color:#FF9900 }
A {
font-family:Verdana;font-size:11px;color:#FFCC00;t
ext-decoration:none }
A:hover { font-family:Verdana;font-size:11px;color:#CC0000 }
</STYLE>
</HEAD>
<BODY BACKGROUND="images/fond.gif" BGCOLOR=#000000 LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>
<CENTER>
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=711>
<TR>
<TD COLSPAN=3><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=711>
<TR>
<TD WIDTH=36><IMG SRC="images/hg.gif" BORDER=0 HSPACE=0 VSPACE=0 width="36" height="77"></TD><TD WIDTH=350 BACKGROUND=images/fond_titre.gif ALIGN=center CLASS=titre>
<!-- ICI, CHANGEZ VOTRE TITRE : -->
PC-ASTUCES simcityworld<BR><IMG SRC="images/pix.gif" BORDER=0 WIDTH=2 HEIGHT=3></TD><TD WIDTH=325>
<IMG SRC="images/hd_jau.gif" BORDER=0 HSPACE=0 VSPACE=0 width="325" height="77"></TD>
</TR>
</TABLE></TD>
</TR>
<TR>
<TD COLSPAN=3><IMG SRC="images/m_jau.gif" BORDER=0 HSPACE=0 VSPACE=0 width="711" height="10"></TD>
</TR>
<TR>
<TD WIDTH=147 BACKGROUND=images/menu_fond.gif BGCOLOR=#BFBFBF VALIGN=top><BR>
<!-- DEBUT MENU -->
<!-- DEBUT MENU 1 -->
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=147>
<TR>
<TD BACKGROUND=images/menu.gif HEIGHT=22 CLASS=menu><B> News</B></TD>
</TR>
<TR>
<TD><IMG SRC="images/menu_und_jau.gif" BORDER=0 HSPACE=0 VSPACE=0 width="147" height="16"></TD>
</TR>
</TABLE>
<font color="#000000"><a href="article.html"><font color="#0000FF">Articles</font></a></font><p>
<font color="#000000"> humour :</font></p>
<p><font color="#0000FF"> <a href="perles-tchat.html"><font color="#0000FF">les
perles du tchat</font></a></font></p>
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=147>
<TR>
<TD BACKGROUND=images/menu.gif HEIGHT=22 CLASS=menu><B> MENU</B></TD>
</TR>
<TR>
<TD><IMG SRC="images/menu_und_jau.gif" BORDER=0 HSPACE=0 VSPACE=0 width="147" height="16"></TD>
</TR>
</TABLE>
<font color="#000000"> <a href="index.html"><font color="#0000FF">
Accueil</font></a></font><p><font color="#0000FF"> </font>
<font color="#000000"><a href="explication.html"><font color="#0000FF">
Pourquoi tout cela ?< /font></a></font><font color="#0000FF"><BR>
</font><font color="#000000"><a href="secur.html">
<font color="#0000FF">Sécurité</font></a><font color="#0000FF"><BR>
</font></font><a href="optim.html"><font color="#0000FF">O</font></a><font color="#000000"><a href="optim.html"><font color="#0000FF">ptimisation</font></a><font color="#0000FF"><BR>
</font></font><a href="entretien.html"><font color="#0000FF">E</font></a><font color="#000000"><a href="entretien.html"><font color="#0000FF">ntretien</font></a><font color="#0000FF"><BR> </font>
<a href="dls.html"><font
color="#0000FF">Téléchargements</font></a></font><
BR>
<!-- FIN MENU 2 -->
<!-- DEBUT MENU 3 -->
</p>
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=147>
<TR>
<TD BACKGROUND=images/menu.gif HEIGHT=22 CLASS=menu><B>
Ressources</B></TD>
</TR>
<TR>
<TD><IMG SRC="images/menu_und_jau.gif" BORDER=0 HSPACE=0 VSPACE=0 width="147" height="16"></TD>
</TR>
</TABLE>
<a
href="http://www.i-services.net/membres/forum/somm
aire.php?user=86759"><font color="#0000FF">Forum</font></a><font color="#0000FF"><BR>
</font>
<a
href="http://www.i-services.net/membres/livredor/l
ivredor.php?user=86759"><font color="#0000FF">Livre d´or</font></a><font color="#0000FF"><BR>
</font><a href="thxto.html"><font color="#0000FF">R</font></a><font color="#000000"><a href="thxto.html"><font
color="#0000FF">emerciements</font></a></font><fon
t color="#0000FF"><BR>
</font><a href="links.html"><font color="#0000FF">Liens</font></a><font color="#0000FF"><BR>
</font>
<font color="#000000"><a href="contact.html"><font color="#0000FF">Contact</font></a></font><BR>
<!-- FIN MENU 3 -->
<!-- FIN MENU -->
</TD>
<TD BGCOLOR=#5E5E5E WIDTH=530 VALIGN=top STYLE="padding:5"><IMG SRC="images/pix.gif" BORDER=0 WIDTH=2 HEIGHT=10 HSPACE=0 VSPACE=0><BR>
<!-- FIN HEADER -->
<!-- DEBUT SECTION 1 -->
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=495>
<TR>
<TD BACKGROUND=images/se.gif HEIGHT=22 CLASS=menu><b>Contactez-moi</b></TD>
</TR>
<TR>
<TD><IMG SRC="images/sec_jau.gif" BORDER=0 HSPACE=0 VSPACE=0 width="495" height="12"><BR><IMG SRC="images/pix.gif" BORDER=0 WIDTH=2 HEIGHT=5 HSPACE=0 VSPACE=0></TD>
</TR>
</TABLE>
<p>
<IMG SRC="images/puce.gif" BORDER=0 HSPACE=0 VSPACE=0 width="9" height="9">
</p>
<? $ip=$_SERVER[´REMOTE_ADDR´];
echo ´Votre adresse ip est : ´.$ip.´ .´ ; ?>
<p><BR><BR><BR><BR><BR><BR><BR>
<!-- FIN SECTION 3 -->
<!-- DEBUT FOOTER -->
</TD>
<TD WIDTH=34 BACKGROUND=images/d.gif BGCOLOR=#BFBFBF>
<IMG SRC="images/d.gif" BORDER=0 HSPACE=0 VSPACE=0 width="34" height="92"></TD>
</TR>
<TR>
<TD COLSPAN=3><IMG SRC="images/bas.gif" BORDER=0 HSPACE=0 VSPACE=0 width="711" height="19"></TD>
</TR>
</TABLE><DIV ALIGN="center" CLASS=texte>Design © 2003 <A HREF="http://www.k-network.com" TARGET="_blank">K-Network</A> pour <A HREF="http://www.kitgrafik.com" TARGET="_blank">KitGrafik</A></DIV>
</CENTER>
</BODY>
</HTML>
<!-- FIN FOOTER -->
et ça donne :
Parse error: parse error, unexpected T_STRING, expecting ´,´ or ´;´ in
/var/www/free.fr/4/5/simcityworld/PC-ASTUCES/outil
s.php on line 118
qu´est ce qui ce passe ?
merci pour vos réponses
y a une erreur quelque part je te le refais et reéssaye
<? $ip=$_SERVER[´REMOTE_ADDR´];
echo ´Votre adresse ip est : ´.$ip ; ?>
quand tu fais le copié collé remplace les accents graves par des ´ (apostrophes)
voila ct ça le problème faut que tu remplace tous les accents graves qui a dans mon codes par des apostrophes. J´ai testé et ce code marche (avec des apostrophes bien sur)
<? $ip=$_SERVER[´REMOTE_ADDR´];
echo ´Votre adresse ip est : ´ ;
echo $ip ; ?>
ok c´est bon ça marche !! merci !
Et les autres scripts ? test de bande passante, test de connexion...
merci
sa c en dehors de mes capacités dsl
pas grave ta deja fait bcp merci
essaye de contacter les sites qui les font ces tests et demande leur comment ils font où cherche sur google y a peut être
peut on metre du PHP dans une page xhtml?
Oui, si tu renommes la page en .php (et que ton hébergeur le supporte).