[Tool/Web/Other] [PHP] help needed..
#1

Hey,
I'm bad at PHP (but understand a little), and I've got this code (explanation what I want inside the code):
PHP код:
$conn ftp_connect("FTP SERVER") or die("Sorry!<br /> Database is unavailable at the moment!"); // Connecting to remote FTP
        
ftp_login($conn,"LOGIN","PASS");
        
ftp_get($conn,"file.sav","directory/name.sav",FTP_ASCII); //Taking file from the server
        
$file "file.sav";
/*
           file.sav would look like this:
             --------------------------
             parameter1=12345
             parameter2=1234
             parameter3=13456
             parameter4=134894
             parameter5=123
             
             (Numbers are random here)
*/

$handle fopen($file'r+'); //( r+ - Read/Write. Starts at the beginning of the file)
        
$data fread($handlefilesize($file)); // Reads the data (hope this works)
        
if($data)
        {
            if(
stristr($data,"parameter3") != FALSE// Don't know if this is right
            
{
                
//I need to get value of parameter3, and change it to 999 or something..
            
}            
        }
        
//And then it should save the file and upload it to remote FTP server..
        
ftp_close($conn);//Closing connection
        
*/ 
Reply


Messages In This Thread
[PHP] help needed.. - by SiJ - 15.01.2010, 12:00
Re: [PHP] help needed.. - by Christopher. - 15.01.2010, 15:48
Re: [PHP] help needed.. - by SiJ - 15.01.2010, 16:16
Re: [PHP] help needed.. - by darkrider366 - 15.01.2010, 19:58
Re: [PHP] help needed.. - by iLinx - 15.01.2010, 20:02
Re: [PHP] help needed.. - by SiJ - 15.01.2010, 20:38
Re: [PHP] help needed.. - by iLinx - 15.01.2010, 21:53
Re: [PHP] help needed.. - by SiJ - 16.01.2010, 07:15
Re: [PHP] help needed.. - by mooman - 16.01.2010, 11:50
Re: [PHP] help needed.. - by iLinx - 16.01.2010, 13:35

Forum Jump:


Users browsing this thread: 1 Guest(s)