Subversion Repositories ALCASAR

Rev

Rev 2607 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2607 Rev 2611
Line 17... Line 17...
17
 *   along with this program; if not, write to the                         *
17
 *   along with this program; if not, write to the                         *
18
 *   Free Software Foundation, Inc.,                                       *
18
 *   Free Software Foundation, Inc.,                                       *
19
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20
 ***************************************************************************/
20
 ***************************************************************************/
21
 
21
 
22
// $Id: portail.php 2607 2018-08-20 00:16:04Z tom.houdayer $
22
// $Id: portail.php 2611 2018-08-22 16:33:08Z tom.houdayer $
23
 
23
 
24
// xml_utilisateur()
24
// xml_utilisateur()
25
 
25
 
26
function request ($texte) {
26
function request ($texte) {
27
		$strResult = 0;
27
		$strResult = 0;
Line 58... Line 58...
58
function internetTest() {
58
function internetTest() {
59
	$host  = 'www.google.com';
59
	$host  = 'www.google.com';
60
	$host2 = 'www.alcasar.net';
60
	$host2 = 'www.alcasar.net';
61
	$port = 80;
61
	$port = 80;
62
 
62
 
63
	$sock = fsockopen($host, $port, $errno, $errstr, 2);
63
	$sock = @fsockopen($host, $port, $errno, $errstr, 2);
64
	if (!$sock) {
64
	if ($sock) {
-
 
65
		fclose($sock);
65
		return false;
66
		return true;
66
	}
67
	}
67
	fclose($sock);
-
 
68
 
68
 
69
	$sock = fsockopen($host2, $port, $errno, $errstr, 2);
69
	$sock = @fsockopen($host2, $port, $errno, $errstr, 2);
70
	if (!$sock) {
70
	if ($sock) {
-
 
71
		fclose($sock);
71
		return false;
72
		return true;
72
	}
73
	}
73
	fclose($sock);
-
 
74
 
74
 
75
	return true;
75
	return false;
76
}
76
}
77
// Fonction de test du filtrage
77
// Fonction de test du filtrage
78
function filtrageTest($file, $search_regex){
78
function filtrageTest($file, $search_regex){
79
	$pointeur = fopen($file,"r");
79
	$pointeur = fopen($file,"r");
80
	$result = false;
80
	$result = false;