Re: Connected Socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry i should have posted my code to begin with...

<html>
<?php

     $filename = "http://snipergods.port5.com/db1.txt";;
     $filepointer = fopen($filename, "r");
     $arrayFormFile = file($filename);
     fclose($filepointer);
     // For as long as $i is <= the size of the $line array,
     // explode each array element into a username and password pair

     $i = 0;
     $auth = 0;
     $data_pair = explode(",", $arrayFormFile[$i]);
        while($i < sizeof($data_pair))
        {
           if (($data_pair[$i] == $UserName) and ($data_pair[$i+1] ==
$Password))
           {
           $auth = 1;
    }
  $i++;
  $i++;
        }

    if ($auth == "1")
           {
           print "<h1>Welcome $UserName</h1>";
           echo "<p>You're authorized!</p>";
    exit;
           }

           else
           {
           print("wrong id or password");
    exit;
           }

?>

</html>









"Peter Lovatt" <pjln1@sunmaia.net> wrote in message
NFBBKAGAILLHPFOOAKFIOEDLFPAA.pjln1@sunmaia.net">news:NFBBKAGAILLHPFOOAKFIOEDLFPAA.pjln1@sunmaia.net...
> Hi
>
> a guess.....
>
> are you using
> $filehandle = fopen ("filename", "r");
>
> to open the file
>
> http://www.php.net/manual/en/function.fopen.php
>
> for more......
>
> if not, that may be the reason, otherwise post the code you are using and
> lets go from there
>
> Peter
>
> -----Original Message-----
> From: Chris Mach [mailto:cjmach@learn.senecac.on.ca]
> Sent: 01 May 2003 05:44
> To: php-db@lists.php.net
> Subject:  Connected Socket
>
>
> I'm trying to open a simple text file with php and i'm getting a warning
> that says...
> A socket must be already connected...
>
> Does any one know why i'm getting this? or how to fix it?
>
> Thanks  :o)
>
> - Chris
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux