Aide pour script php

Fermé
byrong Messages postés 25 Date d'inscription dimanche 20 avril 2008 Statut Membre Dernière intervention 30 avril 2024 - 12 mai 2008 à 12:44
byrong Messages postés 25 Date d'inscription dimanche 20 avril 2008 Statut Membre Dernière intervention 30 avril 2024 - 12 mai 2008 à 20:10
Bonjour,

voila j'avais un script qui me permettait de gagner du temps pour redemarrer mon modem car j'avais des conflits.

Maintenant j'ai changer de modem, le nouveau modem est de la meme marque a savoir belkin mais j'ai toujours ce probleme et mon script qui redemarrais le modem tout seul ne fonctionne pas avec ce modem de modem.

Pouvez vous m'aider? je vais mettre en dessous mon script qui fonctionnais avec l'ancien modem et la page source du modem. Pourriez vous m'aider a faire en sorte que mon script fonctionne avec le nouveau modem

merci


Voici le script php:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
[code]
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,"http://192.168.2.1/cgi-bin/statusprocess.exe");
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,"http://192.168.2.1/cgi-bin/statusprocess.exe");
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);

?>
/code
-----------------------------------------------------------------------------------------------------------------------------------------------------------------


Et voici le code source du modem

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
[code]
<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>
/code
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

merci pour votre aide
A voir également:

1 réponse

byrong Messages postés 25 Date d'inscription dimanche 20 avril 2008 Statut Membre Dernière intervention 30 avril 2024
12 mai 2008 à 20:10
pas d'idée?
0