I need some help. I would like to create a fallback for my source code. I am using a cdn to host my javascript and css and images. What I am trying to do is create a fallback in php that will say for instance is ip 123.456.789 is not available in 400ms the php will fallback to fetch my local storage at 987.654.321
I was thinking something on the lines of this:
if ip 123.456.789 in 400ms
//show this file from 123.456.789
else
//show this file from 987.654.321
I have my source code hard coded such as:
<script type="text/javascript" src="123.456.789/js/jquery.js"></script>
So if 123.456.789 is not available in 400ms I would like this one to load
<script type="text/javascript" src="987.654.321/js/jquery.js"></script>