How can I write a php function or script to check what a URL redirects to and create a case based on that? For example, let's say i have the URL http://www.xyz.com. Dependent on whether a live user is online, I want it to redirect to http://www.abc.com, and then list some code. If the person is offline, I want it to redirect to http://www.fgh.com, and list some other code. How do I ask PHP to figure out where it's redirecting to and what steps to take after finding out. I'm assuming if..else and switch would have to come into play...
hey thanks for the help, i think i may not have been clear. the redirects are already in place, and its like a live chat system. so if the support agent is online it'll redirect to one url, if they're offline it'll redirect to another. what i need to know how to do is check if their online, and then display some code. i'm not doing the redirect myself, i'm checking to see whether the support agent is online or not.
hey thanks for the help, i think i may not have been clear. the redirects are already in place, and its like a live chat system. so if the support agent is online it'll redirect to one url, if they're offline it'll redirect to another. what i need to know how to do is check if their online, and then display some code. i'm not doing the redirect myself, i'm checking to see whether the support agent is online or not.