To check fsock function,Open your php.ini
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On (Make sure this is ON)
; Define the anonymous ftp password (your email address)
;from="abc@com"
; Default timeout for socket based streams (seconds)
default_socket_timeout = 60
With following script you can check your fsock functionalty.
vi test.php (under web server dir) Run this script...
$fp = fsockopen ("localhost", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)
\n";
}else
{
echo "connected";
}
fclose ($fp);
?>
If you get connected message ..that mean you fsock function enable.
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On (Make sure this is ON)
; Define the anonymous ftp password (your email address)
;from="abc@com"
; Default timeout for socket based streams (seconds)
default_socket_timeout = 60
With following script you can check your fsock functionalty.
vi test.php (under web server dir) Run this script...
$fp = fsockopen ("localhost", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)
\n";
}else
{
echo "connected";
}
fclose ($fp);
?>
If you get connected message ..that mean you fsock function enable.
0 comments:
Post a Comment