SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Write remote and local?

    I have a script I run on my host, it performs some operations then writes to a file. Problem is of course it is just writing to the files on my host server. I have always tried to keep identical files in identical order on my home pc as on my host.

    I think you can see the problem already, there have been a few instances that I have uploaded files from my home pc and it's overwritten those files on the remote.

    Any suggestions on how I could write local and remote? I want the script to stay on the host, so I don't want to run local and then say ftp to the remote. Maybe I am asking for alot.

    I could send my self an e-mail with a link to the file, but it is a config.inc.php file, so downloading or linking to it will not really work. Is there a way to send myself an e-mail, that contains a link to the file and when I click on the link it downloads?

    Or any other ideas or suggestions?
    Thank you.

    ronnie
    The largest selection of PLR Articles on the Planet!
    Many Private Label Rights Products.

  2. #2
    SitePoint Zealot moshe_be's Avatar
    Join Date
    Dec 2000
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe I am not understanding the question, but why not log into the FTP and download that file?

  3. #3
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No I think you understand. Yes I could do that. Just that sometimes I use the script alot and it writes to many files. And I made the script to automate some of my tasks, so I am trying to make it as auto and quick as possible. not to mention, so I don't foget to download a file.

    I don't have enough time in the day to get everything done, thats the whole reason for the script, I am trying to cut out as much "hands on" as I can.

    If ftp is the only way, that will work. Just hoping some one had a idea or suggestion...

    ronnie
    The largest selection of PLR Articles on the Planet!
    Many Private Label Rights Products.

  4. #4
    SitePoint Zealot moshe_be's Avatar
    Join Date
    Dec 2000
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could get a mail script and e-mail you the files you change

  5. #5
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats an idea, add a mail function to it, to send me the files by attaching them. Thanks. I did'nt think about that.
    I'll have to do some studying..

    ronnie
    The largest selection of PLR Articles on the Planet!
    Many Private Label Rights Products.

  6. #6
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well if you are interested in doing what you first asked, with sending a link to a script that downloads the new file you could use something similiar to this.

    PHP Code:
    <?
    //Mail script
    $to "me@mydomain.com";
    $subject "New file modified";
    $body .= sprintf('http://localhost/dl.php?file=%s%s'"test1.php""\n");
    mail($to$subject$body);
    ?>
    dl.php
    PHP Code:
    <?
        $file 
    stripslashes($file);
        
    header("Content-Type: plain/text");
        
    header("Content-Disposition: attachment; filename=\"".$file."\"");
    ?>
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  7. #7
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Freddy,

    Thats exactly what I was looking for. I think it would be perfect. Thanks alot!

    ronnie
    The largest selection of PLR Articles on the Planet!
    Many Private Label Rights Products.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •