Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP redirection and referal, any help ?
Old 09-09-2008, 04:10 AM PHP redirection and referal, any help ?
Skilled Talker

Posts: 85
Name: Ilyes Rhouma
Trades: 0
Hi,
I used header("location: ...");

But my problem is that when I redirect to some website, they don't see my website as a referer, so what to do ?

I need a way that, when I redirect from "redirect.php" to "page.php" with header("location: page.php"); or any other function, and in page.php, if I use $_SERVER['HTTP_REFERER']; I need to see "redirect.php, is this possible ?
__________________
Want a cheap and custom programmer or writer ?
Please login or register to view this content. Registration is FREE

Are you
Please login or register to view this content. Registration is FREE
? Start
Please login or register to view this content. Registration is FREE
free and earning money !
Please login or register to view this content. Registration is FREE

Last edited by Ilyes; 09-09-2008 at 04:11 AM..
Ilyes is offline
Reply With Quote
View Public Profile Visit Ilyes's homepage!
 
 
Register now for full access!
Old 09-09-2008, 04:47 AM Re: PHP redirection and referal, any help ?
ebookey's Avatar
Average Talker

Posts: 22
Trades: 0
From the original php documentation:
Quote:
'HTTP_REFERER'
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
IE and some other browsers don't send referrers every time when you use php or javascript calls. You should try with Firefox.
__________________

Please login or register to view this content. Registration is FREE
- free download, user friendly site, no need to register, no membership required.
ebookey is offline
Reply With Quote
View Public Profile Visit ebookey's homepage!
 
Old 09-09-2008, 05:01 AM Re: PHP redirection and referal, any help ?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Try sending
PHP Code:
header("referer: http://url_of_referring_page"); 
before the location header.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-10-2008, 06:58 PM Re: PHP redirection and referal, any help ?
Average Talker

Posts: 17
Trades: 0
I think the best way is to use meta tags... You avoid all those problems.

PHP Code:
echo '<META HTTP-EQUIV="Refresh" Content="0;URL=pagehere.php">'
I dont know if this will help, but in some cases it worked better for me. I avoid many header errors.
__________________

Please login or register to view this content. Registration is FREE
Make new friends.
esmimundo is offline
Reply With Quote
View Public Profile
 
Old 09-12-2008, 06:21 AM Re: PHP redirection and referal, any help ?
Skilled Talker

Posts: 85
Name: Ilyes Rhouma
Trades: 0
Thank you for your help but they did not work they don't show me as a referrer .
I understand that the browser send the referer to the website, so it should be done in javascript, and I found a solution for this.
I found a solution, see here:
http://www.webmaster-talk.com/javasc...lp-needed.html
__________________
Want a cheap and custom programmer or writer ?
Please login or register to view this content. Registration is FREE

Are you
Please login or register to view this content. Registration is FREE
? Start
Please login or register to view this content. Registration is FREE
free and earning money !
Please login or register to view this content. Registration is FREE
Ilyes is offline
Reply With Quote
View Public Profile Visit Ilyes's homepage!
 
Old 09-18-2008, 03:18 AM Re: PHP redirection and referal, any help ?
ndr
ndr's Avatar
Novice Talker

Posts: 9
Trades: 0
Quote:
Originally Posted by esmimundo View Post
I think the best way is to use meta tags... You avoid all those problems.
Beware: many browsers won't send a referer when redirecting to another URL via "refresh".
__________________

Please login or register to view this content. Registration is FREE
- help surfers find your pages after an address change!
Free and ad-free!
ndr is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP redirection and referal, any help ?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.79872 seconds with 12 queries