General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 15th, 2003, 09:15 AM
Snowfruit Snowfruit is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Ireland
Posts: 11 Snowfruit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Copy a file to multiple locations

Hi there,

I need some suggestions on how to achieve the following:

I am generating a HTML file from a form using PHP - that works fine. Now I need to copy this file to about 100 different web sites - some on the same server some on other servers. Also the list of web sites will be constantly changing as new sites are added and old sites decomissioned.

What would be the best way to achieve this? I am working in PHP at the moment so a PHP script would be great but if not then can I call a server-based script from within the PHP code?

Thanks in advance,

Reply With Quote
  #2  
Old January 15th, 2003, 10:07 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 15
To do this, you would need the script to be native; being the script needs to be on the server where you are trying to put the copy. The script on the recieving server would then make the call to copy the file and place it in the correct location.

Using file sockets this can be accomplished. Each server (the servers where you need to place the copies) would have a copy of a script in a standard location. When you do your update, after the update is complete your script (also using file sockets) would ping each of the scripts on the other servers and activate the script to do the file copies.

Now, this is a very awkward thing to do and may cause some security leaks if you are not very careful. If this is some sort of display file or html to be displayed on these sites, you could simply create yourself some RSS feeds to do the trick; where the sites would just capture the feed from your site.

Check out fsockopen() and its related functions if you need to do the file capturing and writing on the other servers...
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
  #3  
Old January 15th, 2003, 10:39 AM
Snowfruit Snowfruit is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Ireland
Posts: 11 Snowfruit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Arrow Re.

Your second option sounds promising....
What I'm attempting is to create a html page of links to all of our other sites and place a copy of this file onto each one of those other sites. Its a physical page that needs to be copied as soon as it has been updated....

So what is RSS? and how do I go about it?

Reply With Quote
  #4  
Old January 15th, 2003, 11:31 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 15
Ok, mitch did an article on xml syndication feeds; the article is here -> http://www.devarticles.com/art/1/53

Now, theres one thing to remember - the file itself will be on your server and the and the other sites will be displaying this file through there page; whenever there page is requested.

To give you an example of the syndication, you can chech out this sites syndication here -> http://www.devarticles.com/cfexample.html

You can format the output of your syndication any way you wish, from a quarter page to half page to full page.

BTW - RSS stands for Really Simple Syndication and is a dialect of XML...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Copy a file to multiple locations


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap