Nitz Nitz - 2 years ago 102
PHP Question

Change the URL through PHP

I want to change the URL through PHP.

Something like

window.location.href = "http://www.something.com"
in JavaScript.

I want the same thing but in PHP. How can I do it?

Answer Source

You can use the header function for that:

header("LOCATION: http://www.something.com");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download