No announcement yet.

fopen through http

  • Filter
  • Time
  • Show
Clear All
new posts

  • fopen through http

    Hey all:

    PHP Code:

    = @fopen ("""r");



    $wholine fgets($whofile4096);

    fclose ($whofile);

    $whoarray explode(" "$wholine);

    $totalircusers count($whoarray);


    $x=0$x $totalircusers$x++)


    $x == $totalircusers 1)


    $ircusers .= $whoarray[$x];




    $ircusers .= $whoarray[$x] . ", ";



    Ok, my question is this...if the text file on the other server cannot be reached for some reason then it makes the whole page fail to load.

    Is there anyway to safegaurd against this? Meaning...if there is a network problem and the file is unreachable then just print N/A or something like that or at least just continue to load the rest of the page?
    version2 aka mol

    Mystic Wicks Online Pagan Community Forums
    Mystic Wicks After Dark

  • #2
    well you started it. the if statemnet is the start. you just need to include an else with that and then load the rest of the page.

    or use file_exist($whofile)


    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.