|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
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, |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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? |
|
#4
|
|||
|
|||
|
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... |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Copy a file to multiple locations |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|