1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[HELP] Copy a txt file between two remote servers

Discussion in 'Black Hat SEO' started by mullet, Dec 13, 2011.

  1. mullet

    mullet Junior Member

    Joined:
    Jun 21, 2011
    Messages:
    130
    Likes Received:
    26
    Hey guys

    Been searching for awhile without any luck.

    I need to copy a single text file from a web site, lets call it example.com/file1.txt to my hosting account, lets call that personaldomain.com/

    This needs to happen hourly so I presume its going to need a cron job (I will do this via cpanel) Additionally, it needs to overwrite the existing file1.txt every time it copies. If anyone knows the code to do this it will be much appreciated.

    Please can you help me out?

    Thanks
     
  2. memme

    memme Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 19, 2009
    Messages:
    1,170
    Likes Received:
    99
    Location:
    Blackhatlinks.com
    Home Page:
    hey, try this one, works well...

    save code to a php file and cron it

    Code:
    <?php
    
    copy("http://www.your-target.com/123.txt","/local/web/dir/temp.txt");
    
     ?> 
    
     
    • Thanks Thanks x 1