Aide pour script PHP
Dernière réponse : dans Programmation
Bonjour
voila j'ai une page qui me permet de déconnecter et reconnecter mon modem automatiquement. Ce qui m'évite en cas de problème d'aller sur la page du modem, et d'aller faire ca manuellement.
Cependant ma page fonctionnait bien avec mon modem mais j'ai du changer de modem car le précédent ne s'allumait plus.
Le nouveau est un modem belkin comme le précédent mais ma page ne marche pas avec ce nouveau model.
Est ce qu'il serait possible de m'aider a modifier mon script afin qu'il fonctionne avec ce nouveau model? Pour se faire, je vais donc afficher le script que j'avais fait avant et également la page source du modem.
J'ai deja essayer moi meme de la faire, il redémarre bien le modem mais apres il tente de charger la page "action" et dit qu'elle n'existe pas. Moi je veux juste qu'il redemarre le modem et ne tente pas de charger une page.
Script php:
Et voici la page source du nouveau modem:
voila j'ai une page qui me permet de déconnecter et reconnecter mon modem automatiquement. Ce qui m'évite en cas de problème d'aller sur la page du modem, et d'aller faire ca manuellement.
Cependant ma page fonctionnait bien avec mon modem mais j'ai du changer de modem car le précédent ne s'allumait plus.
Le nouveau est un modem belkin comme le précédent mais ma page ne marche pas avec ce nouveau model.
Est ce qu'il serait possible de m'aider a modifier mon script afin qu'il fonctionne avec ce nouveau model? Pour se faire, je vais donc afficher le script que j'avais fait avant et également la page source du modem.
J'ai deja essayer moi meme de la faire, il redémarre bien le modem mais apres il tente de charger la page "action" et dit qu'elle n'existe pas. Moi je veux juste qu'il redemarre le modem et ne tente pas de charger une page.
Script php:
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"<a href="http://192.168.2.1/home.htm" target="_blank">http://192.168.2.1/home.htm</a>"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "PPP_Connect=0&PPP_Disconnect=0&disconnect=Disconnect"); curl_exec ($ch); curl_close ($ch); sleep(3); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"<a href="http://192.168.2.1/home.htm" target="_blank">http://192.168.2.1/home.htm</a>"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "PPP_Connect=0&PPP_Disconnect=0&connect=Connect"); curl_exec ($ch); curl_close ($ch); ?>
Et voici la page source du nouveau modem:
<html> <head> <link rel="stylesheet" href="/webconfig/styles/main_router.css" tppabs="/styles/main_router.css" type="text/css"> <SCRIPT language="JavaScript" src="/webconfig/styles/function.js"></SCRIPT> <script language="JavaScript"> setTimeout('document.location.href="/logout.htm";', 600000); function ppp_connect() { document.tF.action.value = "connect"; return true; } function ppp_disconnect() { document.tF.action.value = "disconnect"; return true; } //show clock var beInitialized = 0; var timeString = '10.05.2008 20:18:48 '; function funClock() { var runTime = new Date(); var hours = document.tF.hour.value; var minutes = document.tF.min.value; var seconds = document.tF.sec.value; var dn = "AM"; var isFirefox = false; if (!document.layers && !document.all) { isFirefox = true; //return; } if (hours >= 12) { dn = "PM"; hours = hours - 12; } if (beInitialized != 0) { if (seconds == 0) { minutes++; document.tF.min.value++; if(minutes ==60) { hours++; document.tF.hour.value++; minutes = 0; document.tF.min.value = 0; } } }else beInitialized++; if (hours == 12 && minutes == 0 && seconds == 0) { document.location.href="util_system.html"; return; } if (minutes <= 9) { minutes = "0" + minutes; } if (seconds <= 9) { seconds = "0" + seconds; } movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " " + dn + "</b>"; if (document.layers) { document.layers.clock.document.write(movingtime); document.layers.clock.document.close(); } else if (document.all) { clock.innerHTML = movingtime; } else if (isFirefox) { document.getElementById("clock").innerHTML = movingtime; } document.tF.sec.value++; if(document.tF.sec.value>59) { document.tF.sec.value = 0; } setTimeout("funClock()", 1000) } function initVariables() { //timeString is like '15.07.2003 13:12:25' document.tF.day.value = parseInt(timeString.substring(0,2)); if(timeString.substring(3,4) != '0') document.tF.mon.value = parseInt(timeString.substring(3,5)); else document.tF.mon.value = parseInt(timeString.substring(4,5)); document.tF.year.value = parseInt(timeString.substring(6,10)); document.tF.hour.value = parseInt(timeString.substring(11,13)); document.tF.min.value = parseInt(timeString.substring(14,16)); document.tF.sec.value = parseInt(timeString.substring(17,19)); } window.onload = funClock; //end of 'show clock' </script> <title>Status</title> </head> <body bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <script language="javascript"> show_title_menu(); </script> <font face="verdana,arial" size="2" color="#33FF33">Connected</font> <script language="javascript"> show_panel_menu('NULL', 'Home', ''); </script> <FORM name="tF" method="post" ACTION="/home.htm"> <INPUT name="action" type="hidden" VALUE=""> <INPUT type="hidden" name="year" VALUE=""> <INPUT type="hidden" name="mon" VALUE=""> <INPUT type="hidden" name="day" VALUE=""> <INPUT type="hidden" name="hour" VALUE=""> <INPUT type="hidden" name="min" VALUE=""> <INPUT type="hidden" name="sec" VALUE=""> <table width="720" border="0" cellspacing="0" cellpadding="0" class="copy_1"> <tr><td> <table width="370" border="0" cellspacing="0" cellpadding="2" class="copy_1"> <tr> <td width="180" class="copy_1" colspan="2"><INPUT type="button" value="Setup Wizard " style="{width:120px;}" class="submitBtn" onMouseOver="window.status='Wizard'; return true;" onMouseOut="window.status=''; return true;" onClick="document.location.href='/wizard.htm';"></td> <td width="180"> </td> </tr><tr> <td width="180"> </td> <td width="180"> </td> </tr> </table></td><td> <table width="370" border="0" cellspacing="0" cellpadding="2" class="copy_1"> <tr> <td width="180" class="copy_1"><INPUT type=submit name=disconnect style="font-size: 10px;font-family:Arial;" onClick="return ppp_disconnect();" VALUE="Disconnect"></td> <td width="180" class="copy_1"><INPUT type=submit name=connect style="font-size: 10px;font-family:Arial;" onClick="return ppp_connect();" VALUE=" Connect "></td> </tr><tr> <td width="180"> </td> <td width="180"> </td> </tr> </table></td></tr> </table> <table width="720" border="0" cellspacing="0" cellpadding="0" class="copy_1"> <tr> <td width=370 valign=top class="section"> <table width="370" border="0" cellspacing="0" cellpadding="2" class="copy_1"> <tr> <td bgcolor="#006699" class="section" colspan=2>System Date and Time</td> </tr> <tr> <td width="180" bgcolor="#94CAE4" class="copy_1"> Current Time</td><td width="190" bgcolor="#94CAE4" class="copy_1"> <script type="text/javascript"> var d=new Date(); var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December"); initVariables(); document.write(monthname[document.tF.mon.value-1] + " ") document.write(document.tF.day.value + ", ") document.write(document.tF.year.value) </script> <span id="clock" style="position:relative;"></span> </td> </tr> <tr> <td width="180" class="copy_1"> </td><td width="190" class="copy_1"> </td> </tr> <tr><td bgcolor="#006699" class="section" colspan=2>Version Info</td></tr> <tr><td width="180" bgcolor="#94CAE4" class="copy_1"> Firmware Version</td><td width="190" bgcolor="#94CAE4" class="copy_1">F5D7632v1.UK.1.00.09 (Oct 18 2005 14:12:32)</td></tr> <tr><td width="180" bgcolor="#E8F8FF" class="copy_1"> Boot Code Version</td><td width="190" bgcolor="#E8F8FF" class="copy_1">V1.0A</td></tr> <tr><td width="180" bgcolor="#94CAE4" class="copy_1"> Hardware Version</td><td width="190" bgcolor="#94CAE4" class="copy_1">R01</td></tr> <tr><td width="180" bgcolor="#E8F8FF" class="copy_1"> Serial Number</td><td width="190" bgcolor="#E8F8FF" class="copy_1">S516025887</td></tr> <tr> <td width="180" class="copy_1"> </td><td width="190" class="copy_1"> </td> </tr> <tr> <td bgcolor="#006699" class="section" colspan=2>Internet Settings</td> </tr> <tr> <td width="180" bgcolor="#94CAE4" class="copy_1"> ADSL Status</td> <td width="190" bgcolor="#94CAE4" class="copy_1"> CONNECTED </td> </tr> <tr> <td width="180" bgcolor="#E8F8FF" class="copy_1"> Data Rate<br> Downstream/Upstream</td><td width="190" bgcolor="#E8F8FF" class="copy_1"> 3360Kb/512Kb </td> </tr> <tr> <td width="180" bgcolor="#94CAE4" class="copy_1"> Connection Type</td><td width="190" bgcolor="#94CAE4" class="copy_1"> PPPoA </td> </tr> <tr> <td width="180" bgcolor="#E8F8FF" class="copy_1"> WAN MAC Address</td><td width="190" bgcolor="#E8F8FF" class="copy_1"> 00:11:50:48:C4:F0 </td> </tr> <tr> <td> </tr> <tr> <td width="180" bgcolor="#94CAE4" class="copy_1"> WAN IP</td><td width="190" bgcolor="#94CAE4" class="copy_1"> 212.87.122.26 </td> </tr> <tr> <td width="180" bgcolor="#E8F8FF" class="copy_1"> Subnet Mask</td><td width="190" bgcolor="#E8F8FF" class="copy_1"> 255.255.255.0 </td> </tr> <tr> <td width="180" bgcolor="#94CAE4" class="copy_1"> Default Gateway</td><td width="190" bgcolor="#94CAE4" class="copy_1"> 212.87.120.1 </td> </tr> <tr> <td width="180" bgcolor="#E8F8FF" class="copy_1"> Primary DNS Address</td><td width="190" bgcolor="#E8F8FF" class="copy_1"> ripley.euphonynet.be </td> </tr> <tr> <td width="180" bgcolor="#94CAE4" class="copy_1"> Secondary DNS Address</td><td width="190" bgcolor="#94CAE4" class="copy_1"> howie.besite.be </td> </tr> </table> </td> <td width=20> </td> <td width=330 valign=top class="section"> <table width="370" border="0" cellspacing="0" cellpadding="2" class="copy_1"> <tr><td bgcolor="#006699" class="section" colspan=2>LAN Settings</td></tr> <tr> <td width="150" bgcolor="#94CAE4" class="copy_1"> Interface Status</td><td width="190" bgcolor="#94CAE4" class="copy_1"> Connected </td> </tr> <tr> <td width="150" bgcolor="#E8F8FF" class="copy_1"> Link Status</td><td width="190" bgcolor="#E8F8FF" class="copy_1"> 100Mbps Full Duplex </td> </tr> <tr><td width="150" bgcolor="#94CAE4" class="copy_1"> LAN MAC Address</td><td width="190" bgcolor="#94CAE4" class="copy_1"> 00:11:50:48:C4:F0 </td></tr> <tr><td width="150" bgcolor="#E8F8FF" class="copy_1"> Router IP Address</td><td width="190" bgcolor="#E8F8FF" class="copy_1"> 192.168.2.1 </td></tr> <tr><td width="150" bgcolor="#94CAE4" class="copy_1"> Subnet Mask</td><td width="190" bgcolor="#94CAE4" class="copy_1"> 255.255.255.0 </td></tr> <tr><td width="150" bgcolor="#E8F8FF" class="copy_1"> DHCP Server</td><td width="190" bgcolor="#E8F8FF" class="copy_1"> Enabled </td></tr> <tr> <td width="150" bgcolor="#94CAE4" class="copy_1"> Number of DHCP Clients</td><td width="190" bgcolor="#94CAE4" class="copy_1">5</td> </tr> <tr> <td width="180" class="copy_1" bordercolor="#E8F8FF"> </td><td width="190" class="copy_1" bordercolor="#E8F8FF"> </td> </tr> <tr> <td width="180" class="copy_1"> </td><td width="190" class="copy_1"> </td> </tr> <tr> <td bgcolor="#006699" class="section" colspan=2>WLAN Settings</td> </tr> <tr> <td width="150" bgcolor="#94CAE4" class="copy_1"> Wireless Function</td><td width="180" bgcolor="#94CAE4" class="copy_1"> Enabled </td> </tr> <tr> <td width="150" bgcolor="#E8F8FF" class="copy_1"> WLAN MAC Address</td><td width="190" bgcolor="#E8F8FF" class="copy_1"> 00:12:bf:09:69:0e </td> </tr> <tr> <td width="150" bgcolor="#94CAE4" class="copy_1"> Mode</td><td width="180" bgcolor="#94CAE4" class="copy_1"> Mixed (11b+11g) </td> </tr> <tr> <td width="150" bgcolor="#E8F8FF" class="copy_1"> SSID</td><td width="180" bgcolor="#E8F8FF" class="copy_1"> belkin54g </td> </tr> <tr> <td width="150" bgcolor="#94CAE4" class="copy_1"> ESSID Broadcast</td><td width="180" bgcolor="#94CAE4" class="copy_1"> Enabled </td> </tr> <tr> <td width="150" bgcolor="#E8F8FF" class="copy_1"> Channel</td><td width="180" bgcolor="#E8F8FF" class="copy_1"> 11 </td> </tr> <tr> <td width="150" bgcolor="#94CAE4" class="copy_1"> Security</td><td width="180" bgcolor="#94CAE4" class="copy_1"> WEP </td> </tr> <tr> <td width="180" class="copy_1"> </td><td width="190" class="copy_1"> </td> </tr> <tr> <td bgcolor="#006699" class="section" colspan=2>Advanced Features</td> </tr> <tr> <td width="150" bgcolor="#94CAE4" class="copy_1"> UPnP</td><td width="180" bgcolor="#94CAE4" class="copy_1"> Disabled </td> </tr> <tr> <td width="150" bgcolor="#E8F8FF" class="copy_1"> NAT</td><td width="180" bgcolor="#E8F8FF" class="copy_1"> Enabled </td> </tr> <tr> <td width="150" bgcolor="#94CAE4" class="copy_1"> Firewall</td><td width="180" bgcolor="#94CAE4" class="copy_1"> Disabled </td> </tr> </table> </td> </tr> </table> <br> <br> <script language="javascript"> show_menu_table_end(); </script> </FORM> </body> </html>
Autres pages sur : aide script php
Lassé par la pub ? Créez un compte
Lassé par la pub ? Créez un compte
- Contenus similaires :
- SolutionsScript php exécuter 2 fois
- Solutions[PHP] Problème script pour empêcher double post
- SolutionsProbleme PHP - Script news
- Solutions[php] PB dans mon script ou chez ovh ?
- Solutions[php] script Upload fichier $_files vide -_-"
- SolutionsErreur sur un script php
- ForumTuto PHP et JAVA script
- ForumScript php de vérification numéro carte bancaire
- ForumComment créer un site web à partir des codes java script html, php
- Voir plus