Forum Moderators: coopster
I own ten different websites. I want to make a new script that will be placed on the main server. I will add a one line php code in the footer or header of each of the ten websites.
* when any of the ten site loads the one line code will call a script that will be stored in a different physical location (my main server)
I want that script to read an xml file for different URLs and then visit any of those URL sending some values.
Now I have a few questions that are creating confusion.
1) what is the best efficient way to call the script on the main server which is on a different physical location so that the other site (any of the ten sites I own) is not affected and the visitor doesn't experience that any script is called.
2) I do not want to put any burden on the calling site (any of the ten sites) of the processing call-xml.php on main server will do i.e to read xml file and then visit a URL from there. How can this be accomplished? because sometimes my main server goes down and I do not want the ten sites to experience any slow browsing or disturbance due to the main server script.
3) who will be the referer to the url that call-xml.php visits? My Main server or the calling site (any of the ten)... i want my main site to be the referer to the URL fetched from XML file
many thanks in advance.
Alternatively, check file_get_contents [uk3.php.net] or fopen [uk3.php.net].
dc
1 - visitor browses any page of the ten sites
2 - at the footer of each page i will call the script on main site that will start a lengthy processing
3 - call main site script and end as normal and do not wait for the called script to generate output because that will be long processing and I do not want my visitors to experience slow browsing or page loading..
what I want is to generate a call to the script and end and do not wait for whatever crap that script is going to process :)
I hope you got my point now...
I was thinking to initiate a background php process with shell_exec() function but I am confused that is it the best way and will it work?
My main goal is NOT to disturb my sites visitor's browsing and just generate a call from their visit and complete my processing meanwhile they are free to either close their browser or move to any other page and my process will keep working...