How can I redirect to other http / php links/files?

General discussions related to php

Moderators: macek, egami, gesf

Jitesh_L
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Mar 02, 2003 2:27 pm

How can I redirect to other http / php links/files?

Postby Jitesh_L » Sun Mar 02, 2003 2:30 pm

Hi, does anyone know which function can redirect the browser to other http/php sites /files , within a function?
To be more specific, I want my php file to write to an XML file, then redirect and make that file viewable.

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: How can I redirect to other http / php links/files?

Postby WiZARD » Sun Mar 02, 2003 11:22 pm

Try see info in php.net/manual about locate or fopen

Jitesh_L
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Mar 02, 2003 2:27 pm

Postby Jitesh_L » Mon Mar 03, 2003 2:00 am

I Have already used fopen to open the file and write to the xml file, but i want the browser to redirect to that file (hence displaying it) after I have closed the file pointer. i searched for function locate and there is no information on this.

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Postby WiZARD » Mon Mar 03, 2003 2:18 am


User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Mon Mar 03, 2003 7:58 am

header('Location http://yourname.com');

Make sure you use the FULL url. some older browsers do not like partial URL's


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 0 guests