Location: PHPKode > scripts > CardFountain® Greetings ( 10,000 co-branded ecards ) > cardfountain-greetings-10000-co-branded-ecards/compat.php
<?php
//////////////////////////////////////////////////////////////////////////
// TEST FOR REQUIRED SERVER SPECS/FUNCTIONS AND VALID GLOBAL VARIABLES
//////////////////////////////////////////////////////////////////////////
if ($_SERVER[HTTP_HOST] == "")
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( _SERVER[HTTP_HOST] ) is not being set within the server globals:<br>';
  echo '<a href="http://us3.php.net/reserved.variables">learn more about this global here</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if ($_SERVER[SCRIPT_NAME] == "")
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( _SERVER[SCRIPT_NAME] ) is not being set within the server globals:<br>';
  echo '<a href="http://us3.php.net/reserved.variables">learn more about this global here</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("basename"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:basename() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.basename.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("ob_start"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:ob_start() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.ob-start.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("ob_get_contents"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:ob_get_contents() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.ob-get-contents.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("ob_end_clean"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:ob_end_clean() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.ob-end-clean.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("preg_match"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:preg_match() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.preg-match.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("preg_replace"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:preg_replace() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.preg-replace.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("ereg_replace"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:ereg_replace() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.ereg-replace.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("eregi_replace"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:eregi_replace() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.eregi-replace.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("quotemeta"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:quotemeta() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.quotemeta.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("urlencode"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:urlencode() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.urlencode.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("urldecode"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:urldecode() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.urldecode.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("file_get_contents"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:file_get_contents() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.file-get-contents.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!function_exists("trim"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( function:trim() ) is not available in your current version of php:<br>';
  echo '<a href="http://us3.php.net/manual/en/function.trim.php">learn more about this function</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if (!(bool)ini_get("allow_url_fopen"))
 {
  $cf_compatible = false;
  echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
  echo '( allow_url_fopen ) is not enabled in your php.ini file yet:<br>';
  echo '<a href="http://us3.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen">learn how to adjust this setting</a>';
  exit; /* stop here because the server is not compatible yet */
 }
else if ($cf_cache) /* additional requirements if caching is enabled */
 {
  if (!function_exists("md5"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:md5() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.md5.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("is_dir"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:is_dir() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.is-dir.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("mkdir"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:mkdir() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.mkdir.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("chmod"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:chmod() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.chmod.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("is_writable"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:is_writable() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.is-writable.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("file_exists"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:file_exists() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.file-exists.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("strtotime"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:strtotime() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.strtotime.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("filemtime"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:filemtime() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.filemtime.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("mktime"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:mktime() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.mktime.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("date"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:date() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.date.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("fopen"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:fopen() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.fopen.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("fclose"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:fclose() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.fclose.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("flock"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:flock() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.flock.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else if (!function_exists("fwrite"))
   {
    $cf_compatible = false;
    echo '<b>PHP CONFIGURATION PROBLEM: ( not yet compatible with cf-ecards )</b><br>';
    echo '( function:fwrite() ) is not available in your current version of php:<br>';
    echo 'Note: you can disable caching in the config.php file to solve this problem also.<br>';
    echo '<a href="http://us3.php.net/manual/en/function.fwrite.php">learn more about this function</a>';
    exit; /* stop here because the server is not compatible yet */
   }
  else
   {
    $cf_compatible = true; /* ok, looks good! */
   }
 }
else
 {
  $cf_compatible = true; /* ok, looks good! */
 }
?>
Return current item: CardFountain® Greetings ( 10,000 co-branded ecards )