![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
|
Best way to copy from server to server?
I have a video converter on www.*.com. After converting, it sends the file to img.*.com and want your ideas on how to send the file across. They are on different servers.
Currently, on www.*.com, I use something like this: Code:
fsockopen('img1.domain.com', 80); fputs($fp,"POST /image_upload.php HTTP/1.1\r\n"); etc etc etc...(also sends MD5 and password) Code:
if (MD5 security check) { $fp = fopen(IMAGE_PATH . '/'. $filename,"w"); fwrite($fp,$uploaded); fclose($fp); Does anyone think there is a better method of doing this? JM
__________________
www.gimmiegirlproductions.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
|
Try cURL?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
|
Try PHPcli?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Coupon Guru
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
|
scp possibly?
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more! AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Looks like you're loading the entire temp upload file into memory in order to save a copy? PHP is probably hitting the configured maximum memory limit for a script. Why don't you just use php's copy() function?
If it's still failing then try increasing the value of upload_max_filesize in php.ini |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Making PHP work
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,227
|
Quote:
![]() ![]() ![]() ![]() ![]()
__________________
Make Money with Porn |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Pre-empting an "I need to load the file into memory in order to md5 it" reply... use md5_file()
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: May 2002
Location: Paying Webmasters Millions Since 1999
Posts: 4,044
|
rsync or perhaps wget
__________________
![]() Dirty D - ICQ #1326843 - $1 Million Dollars of Bonus Money - 8,000+ FHG! Glory Hole Girlz - Crack Whore Confessions - Tampa Bukkake - Slut Wife Training - Fuck a Fan Electricity Play - Porn Video Drive - Theater Sluts - Skunk Riley - Ukraine Amateurs - Strapon Sessions |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | ||
Confirmed User
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
|
- It is a push, not a pull, so I can't use wget. The sending server must initiate the call.
Quote:
Quote:
Amazing how a different pair of eyes saw that immediately!
__________________
www.gimmiegirlproductions.com |
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Coupon Guru
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
|
Quote:
![]()
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more! AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
send a url to the 2nd server...
then from the 2nd server initiate a GET request with curl to grab the file from the first server... POSTing large files is usually problematic, there are more than dozen things than can go wrong... GET is 10x more robust... or just use scp or rsync....
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Industry Role:
Join Date: Aug 2008
Posts: 1,723
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Feb 2005
Location: Montreal
Posts: 3,018
|
you can use the method you are using ... although maybe not the most efficient way, it does the trick ...
just run it from within the SCREEN command (linux/unix) so that even if your connection burps or hits a bump in the road, the process will keep going ... http://magazine.redhat.com/2007/09/2...to-gnu-screen/ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
Quote:
file_get_contents('http://www.otherserver.com/get.php?filename=whatever'); get.php: shell_exec("wget http://www.firstserver.com/files/".$_GET[filename]); Thats it in a nutshell, but add sanitization on the inputs, check the server ip on get.php etc...
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
CjOverkill
Industry Role:
Join Date: Apr 2003
Location: Woldwide
Posts: 1,328
|
use rsync. It will make the entire md5 process for you and ensure that the content on both servers is always the same.
__________________
CjOverkill Traffic Trading Script Free, secure and fast traffic trading script. Get your copy now ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |