Bonjour

Je suis entrain de dévelloper un "outil de monitoring " afin d'afficher sur un ecran de contrôle des sites web défilant automatiquement.
La partie de rotation auto de plusieurs page web fontionne correctement ( voir ci-dessous si ca intèresse quelqu'un .

Je me heurte à un problème d'authentification sur un page web en ( https://........../index.cgi
Quand j'affiche les source de la page je me retrouve avec xml et j'avoue je n'est aucune idée comment s'authentifier en auto
A savoir une fois authentifier on est redirigé vers une page https://........../main.cgi
Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="xsl/Login.xsl"?>
<report>
<CGISrc>index.cgi</CGISrc>
<title>SCREENTITLE</title>
<language>LANGUAGE</language>
<loginPassed>ISPASSED</loginPassed>
<sessionId>SESSIONID</sessionId>
<state>STATE</state>
<userName></userName>
<error>ISERROR</error>
<errorMSG>ERRMSG</errorMSG>
<is_lic>IS_LIC</is_lic>
<lic_info>LIC_INFO</lic_info>
 
<clusterName>Exa-SSS1</clusterName>
<marketingVersion>MARKETINGVERSION</marketingVersion>
<exaVersion>4.1.077</exaVersion>
<productName>ExaStore</productName>
<fullProductName>ExaStore Clustered NAS Console</fullProductName>
<homepage>http://www.exanet.com</homepage>
<support>support@exanet.com</support>
<copyright> </copyright>
</report>

le login.xls
This XML file does not appear to have any style information associated with it. The document tree is shown below.
Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<title>Login</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<script language="JavaScript" src="js/Browsers.js"/>
<script language="JavaScript" src="js/XMLDOM.js"/>
<script language="JavaScript" src="js/XPath.js"/>
<script language="JavaScript" src="js/FieldsValidation.js"/>
<script language="JavaScript" src="js/General.js"/>
<script language="JavaScript" src="js/Login.js"/>
<link rel="stylesheet" href="css/Style.css"/>
</head>
<body style="CURSOR:default" alink="black" leftMargin="0" topMargin="0" MARGINHEIGHT="0" MARGINWIDTH="0" onload="Init();">
<xsl:apply-templates select="report"/>
<xsl:apply-templates select="report" mode="msg"/>
</body>
</html>
</xsl:template>
<!--  Include files  -->
<xsl:include href="MessagesTemplate.xsl"/>
<xsl:template match="report">
<FORM enctype="multipart/form-data" method="POST" id="loginFrm" name="loginFrm" target="_top" acceptcharset="UTF-8">
<xsl:attribute name="action">
<xsl:value-of select="CGISrc"/>
</xsl:attribute>
<input type="hidden" name="sessionId">
<xsl:attribute name="value">
<xsl:value-of select="sessionId"/>
</xsl:attribute>
</input>
<input type="hidden" name="loginPassed">
<xsl:attribute name="value">
<xsl:value-of select="loginPassed"/>
</xsl:attribute>
</input>
<input type="hidden" name="productName">
<xsl:attribute name="value">
<xsl:value-of select="productName"/>
</xsl:attribute>
</input>
<input type="hidden" name="is_lic">
<xsl:attribute name="value">
<xsl:value-of select="is_lic"/>
</xsl:attribute>
</input>
<input type="hidden" name="state" value="login"/>
</FORM>
<FORM method="post" onSubmit="return fieldsValidation();" name="frm" id="frm" enctype="multipart/form-data" acceptcharset="UTF-8">
<xsl:attribute name="action">index.cgi</xsl:attribute>
<input type="hidden" name="is_error">
<xsl:attribute name="value">
<xsl:value-of select="error"/>
</xsl:attribute>
</input>
<div id="pageContent" style="display:none;">
<xsl:if test="loginPassed[.!='Yes']">
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<table WIDTH="80%" BORDER="0" align="center" valign="middle" cellpadding="0" cellspacing="0">
<tr>
<td NOWRAP="true" height="48px">
<a title="Homepage" border="0" target="top">
<xsl:attribute name="href">
<xsl:value-of select="homepage"/>
</xsl:attribute>
<img src="" border="0" id="mainLogId"/>
</a>
</td>
<td height="48px" width="720px" align="right" style="background-repeat:no-repeat;">
<div style="position:relative;top:5px;left:0px;">
<a border="0">
<xsl:attribute name="href">
mailto:
<xsl:value-of select="support"/>
</xsl:attribute>
<img border="0" title="contact" src="images/b_contact.gif" onmouseover="this.src='images/b_contact_over.gif'" onmouseout="this.src='images/b_contact.gif'"/>
</a>
</div>
</td>
</tr>
<tr>
<td colspan="3" background="images/TB.gif" height="27px">
<span style="visibility:hidden">xxx</span>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF" align="center" nowrap="true">
<span style="visibility:hidden">xxx</span>
<xsl:if test="error[.='Yes']">
<div class="stdTxt" style="position:relative;top:10px;">
<img src="images/ico_lock.gif"/>
<xsl:value-of select="errorMSG"/>
</div>
</xsl:if>
</td>
</tr>
<tr>
<td colspan="3" bgcolor="#FFFFFF" align="center">
<table WIDTH="500" height="300" BORDER="0" align="left" cellpadding="2" cellspacing="2">
<tr>
<td>
<table width="50px" BORDER="0"></table>
</td>
<td>
<table BORDER="0">
<tr>
<td colspan="10" nowrap="true" height="60px">
<span class="loginProductName">
<xsl:value-of select="fullProductName"/>
</span>
</td>
</tr>
<tr>
<td colspan="10" height="60px" valign="middle">
<table>
<tr>
<td nowrap="true">
<span class="stdTxt">
Version
<xsl:value-of select="exaVersion"/>
</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td width="100px" valign="bottom" nowrap="true">
<span class="stdTxt">Login to:</span>
</td>
<td valign="bottom" nowrap="true">
<span class="stdTxt">
<b>
<xsl:value-of select="clusterName"/>
</b>
</span>
</td>
</tr>
<tr>
<td width="100px" valign="bottom" nowrap="true">
<span class="stdTxt">User name:</span>
</td>
<td valign="bottom" nowrap="true">
<input type="text" name="NAME" id="NAME" class="stdTxtFieldW">
<xsl:attribute name="value">
<xsl:value-of select="userName"/>
</xsl:attribute>
</input>
</td>
</tr>
<tr>
<td width="100px" valign="bottom" nowrap="true">
<span class="stdTxt">Password:</span>
</td>
<td valign="bottom" nowrap="true">
<input type="password" id="PASSWD" name="PASSWD" class="stdTxtFieldW"/>
</td>
</tr>
<tr/>
<tr/>
<tr/>
<tr>
<td valign="bottom" nowrap="true" colspan="3">
<INPUT type="submit" class="stdButton" value="Login" id="sButton" name="validateLogin" style="width:80px"/>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr/>
<tr>
<td>
<table>
<tr>
<td colspan="3" valign="bottom" nowrap="true">
<span class="stdTxt">
By clicking the login button or using this software, you acknowledge that you have read the
<a href="html/Third_party_licenses.htm" target="_blank" style="color:black">
<span class="stdTxt">license agreement</span>
</a>
,
<br/>
that you understand it, and that you agree to be bound by its terms.
</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td colspan="10" height="60px" valign="middle">
<span class="stdTxt">
Copyright ©
<span id="currentYear"/>
<span class="stdTxt">
<xsl:value-of select="copyright"/>
</span>
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" background="images/TB.gif" height="27"/>
</tr>
</table>
</xsl:if>
</div>
</FORM>
<div style="display:none" id="preload"></div>
</xsl:template>
</xsl:stylesheet>

script php de rotation auto

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
 
/*
Nicolas Gilbert - 14 mai 2013
Script PHP de visualisation de divers pages web
 */
 
class pages {
  private $i;
 
  private $liste;
 
  public function __construct($liste) {
    $this->i=0;
    $this->liste=$liste;
  }
 
  public function __destruct() {
    //echo "DESTRUCT";
  }
 
/*
  private function set_pages($liste) {
    $this->liste=$liste;
  }
*/
 
  private function set_i($i) {
    if ($i<=count($this->liste)-1) {
      $this->i=$i;
    } else {
      $this->i=0;
    }
  }
 
  private function get_next_i() {
    if ($this->i==count($this->liste)-1) {
      return 0;
    } else {
      return ($this->i+1);
    }
  }
 
  private function get_previous_i() {
    if ($this->i==0) {
      return count($this->liste)-1;
    } else {
      return ($this->i-1);
    }
  }
/*
  public function goto_next_page() {
    $this->i=$this->get_next_i();
    $this->show();
  }

  public function goto_previous_page() {
    $this->i=$this->get_previous_i();
    $this->show();
  }
*/
 
  private function show() {
 
    $url_next= "{$_SERVER['PHP_SELF']}?page=" . $this->get_next_i();
    $url_previous= "{$_SERVER['PHP_SELF']}?page=" . $this->get_previous_i();
 
    //echo "Show page n $this->i : {$this->liste[$this->i]}<br>\n";
    $url_include = $this->liste[$this->i];
 
echo "<html>
  <head>
    <title>Afficheur</title>
  </head>

  <body>

  <script type=\"text/javascript\"><!--
setTimeout('Redirect()',40000);
function Redirect()
{
 location.href = '$url_next';
}
// --></script>

<!-- Show page n $this->i : {$this->liste[$this->i]}<br> -->

    <iframe src=\"$url_include\" height=\"100%\" width=\"100%\" frameborder=\"0\">
      Alternative text for browsers that do not understand IFrames.
    </iframe>
  </body>

<!-- <a href='$url_next'>Page suivante<br></a> -->
<!-- <a href='$url_previous'>Page pr&eacute;c&eacute;dente<br></a> -->
</html>";
 
  }
 
  public function goto_page($i) {
    $this->set_i($i);
    $this->show();
  }
$list = new pages(
  array(
    "https://144.165.1.119/main.cgi",
    "https://10.123.128.11/main.cgi"")
);

$page=$_GET['page'];
if (!is_numeric($page)) {
  $page=0;
}

$list->goto_page($page);

?>