PHP Server Copy V .01

Writing by shinda on Wednesday, 2 of August , 2006

One of the biggest pains in hosting a website comes when you realize that you need to switch servers, or mirror a website. Ideally your initial server should do you just fine, but theres always those times when you find a better deal, the initial server gets hacked and you need to move, or for whatever reason you need to move your site, to another server.

Now if your site hosts a lot of files, this can present itself to be a problem in fact become a quite cumbersome ordeal especially if you have a slow Internet connection or limited bandwidth.

It is in that problem that lies the solution which is this script. I searched around for a bit to find a script that could help me mirror a copy of a website, but there was nothing that was simple.

Luckily PHP can handle FTP protocol seamlessly so creating a script wasn’t all that much of an ordeal.

Usage

1) Fill out the FTP connection information


$ftp_server = "ftp.yourftpaddress.com";
$ftp_user_name = "ftp-username";
$ftp_user_pass = "ftp-password";
$ftp_dir = "/your/folder/here/";
 


2) Enter the URL where you want to copy all files from ftp to.

$dirLocal = "/your/local/folder/goes/here/"


*** Make sure that the folder is writable (CHMOD 777)..

3) Save and upload to your server.

4) Run ftp.php by visiting the URL or running the cron job.

Notes

The only testing this script got was when I used it to copy over all my sites from the old server over, and it worked, so theres no super bugs to report.

This is version 1, I doubt that I’ll make a version 2, and don’t think that a nice front-end is necessary. After all the fact that you’re responsible for copying over the site dictates that you have some degree of computer/programming knowledge.

If the script seems to hang up then just stop the page and refresh. Script is smart enough to not replace existing files (if they match that is, and if your server supports ftp_size() );.

No idea if file resume works. I tried to code it in, but never came abouts to testing it.

Warning

This script has the potential to mess up your server if used improperly. By reading and using this, you agree that I am not liable in any shape or manner for any damages and or loss of data that may occur. With that said, I don’t expect the script to wreak all that much havoc on a properly configured server, however you have been warned.

Download




winzip_10_logo.jpg
PHP Server Copy V .01

Comments (19)

Category: Tech

  • Add this post to
  • Digg
  • del.icio.us
  • blogmarks
  • Furl
  • Reddit
  • Slashdot
  • YahooMyWeb
  • Facebook

DJ Jazzy Reff

Writing by shinda on Wednesday, 2 of August , 2006

For those of you with no sound then your missing out. If you’re really going to go and shoot a video then at least make sure that you don’t mumble when you spit your lines, at least that way people can hear the stupidness coming out your mouth. But I have to say this video made my day. That bhangra scene in the back yard, Russle Peters couldn’t have scripted anything better.

The video speaks for itself, interestingly it turns out this man served in the Nagar Kirtan punj before, from walking the fine line mans now a backyard super star. Made my day, well morning, I’m sure it’ll make yours.

Comments (11)

Category: Jokes, Video

  • Add this post to
  • Digg
  • del.icio.us
  • blogmarks
  • Furl
  • Reddit
  • Slashdot
  • YahooMyWeb
  • Facebook

1978 All Over Again

Writing by shinda on Tuesday, 1 of August , 2006

Last night, as was previously reported on the net, Ashotoush and his chelay held an event in Amritsar and the SGPC conveniently closed its eyes. Fortunately the Sikh Panth did not. Last night there was word from Singhs, that a group of 400 Singhs including Bhai Amrik Singh and Jatha, all marched on the event, sending Ashotoush’s chelay running. 15 Singhs ended up being arrested in all, but then again the above isn’t from any confirmed or official source, so numbers and actual happenings may very well vary.

Be that as it may, it’s hard not to compare these reported events to those that happened in 1978, after all you just replace the Narkdhari Gurudom of the past with the Noormehalias and fake Sadhs of the present. When first asked about the comparison I found that although the situation sounded a lot like 78, there existed in 78 a spirit that does not seem so obviously prevalent today. But then again I doubt that this spirit was just as obvious then, and may very well only be visible in hind sight.

End of the day knowing that there are still Singhs, 400 of them in fact, ready to storm on a convention of a Gurudom that exists only to mock Sikhi, then one needs to really wonder about all the negative things you always hear about Sikhi being dead in Punjab. After all maybe this was just that little spark everyone was looking for. That piece of flint to help light the flame underneath the sleeping Quam to help wake it up. Anyways, hopefully other sources can help substantiate the news as we optimistically wait for any confirmation.

Comments (5)

Category: News, Sikhi

  • Add this post to
  • Digg
  • del.icio.us
  • blogmarks
  • Furl
  • Reddit
  • Slashdot
  • YahooMyWeb
  • Facebook

Author

This blog for better or worse is an extension of my procrastination and boredom. It's not intended to convince, impress or convert you to be anything more then what you already are, but if it does then more power to it. Do be warned that the time you waste on this site, will be your own and I will not in any way shape or form be held responsible in compensating you for your losses.