- <?php
- $cfgServer = "phpcs.com";
- $cfgPort = 25;
- $cfgTimeOut = 10;
-
- // ouverture du socket
- if(!$cfgTimeOut)
- // timeout
- $usenet_handle = fsockopen($cfgServer, $cfgPort);
- else
- // with timeout
- $usenet_handle = fsockopen($cfgServer, $cfgPort, &$errno, &$errstr, $cfgTimeOut);
-
- if(!$usenet_handle) {
- echo "Connexion refuser\\n";
- exit();
- }
- else {
- echo "vous etes connecté\n";
- $tmp = fgets($usenet_handle, 1024);
- }
- ?>
<?php
$cfgServer = "phpcs.com";
$cfgPort = 25;
$cfgTimeOut = 10;
// ouverture du socket
if(!$cfgTimeOut)
// timeout
$usenet_handle = fsockopen($cfgServer, $cfgPort);
else
// with timeout
$usenet_handle = fsockopen($cfgServer, $cfgPort, &$errno, &$errstr, $cfgTimeOut);
if(!$usenet_handle) {
echo "Connexion refuser\\n";
exit();
}
else {
echo "vous etes connecté\n";
$tmp = fgets($usenet_handle, 1024);
}
?>