PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I tried to create domain based licensing. The script should be check license each time it'll run. I'll use two domain which are hosted in two different servers and networks so that if a server is down, another one will help scripts for licensing purpose.
Look at the codes bellow. It is working if "domain.net" is up. But I want the code working is any of the servers is up or contain license file. Please help me.....
Warning: file_get_contents(http://domain.com/lic/ok.xml) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\wamp\www\ok.php on line 3
All is well
I just create a license file in domain.net and in domain.com, there is no "ok.xml". That means if any of the server goes down, the error message like above will be shown. Actually I want to display "All is well" is any of the server contain the license file.
No, no, file_get_contents() is a fine time to use it. I just mean be careful about suppressing errors because they can make some bugs hard to track down