• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

fopen and fsockopen

How can I tell if "fopen" and "fsockopen" is installed on my server?
0
COwebmaster
Asked:
COwebmaster
  • 2
2 Solutions
 
Kamaraj SubramanianApplication Support AnalystCommented:
if(!function_exists(\"fsockopen\")) { 
 
 echo \"Function Exists\"; 
 
}

Open in new window

0
 
Kamaraj SubramanianApplication Support AnalystCommented:
<?php
If(function_exists("fsockopen"))
{   
echo 'Function Exists';
}
Else
{
   echo 'function does not exist';
}
?> 

Open in new window


0
 
Ray PaseurCommented:
Try to use them!  

First, you can look them up on php.net, and you should always do that any time you are not 100% dead-certain (1) what inputs are required, (2) how they work, (3) what outputs and return values are expected.  Always read the online man pages and pay attention to the user-contributed notes that are some of the best parts of php.net.  Here are the links you want to study:
http://php.net/manual/en/function.fopen.php (part of the FileSystem) http://php.net/manual/en/filesystem.installation.php
http://php.net/manual/en/function.fsockopen.php (part of the Network) http://php.net/manual/en/network.installation.php
0
 
COwebmasterAuthor Commented:
Thanks!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now