How would I change to another website using php?

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!

Moderator: General Moderators

Post Reply
hughmanwho
Forum Newbie
Posts: 1
Joined: Fri Jan 02, 2009 4:30 pm

How would I change to another website using php?

Post by hughmanwho »

I would like to open a file and based upon what is within that file either do nothing or switch to another website. I have the file reading and writing working but can not figure out how to switch to a different website. Would anyone be able to help me? Thank you!
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: How would I change to another website using php?

Post by jaoudestudios »

If headers have not been sent, then in your conditional statement you can use header("LOCATION:*URL*");
Post Reply