/    Sign up×
Community /Pin to ProfileBookmark

Notice: Undefined index: HTTP_REFERER

Hi again,

In the google index, I noticed a problem on my site, something similar as you see here:
[url]http://www.google.co.uk/search?q=%22Notice%3A+Undefined+index%3A+HTTP_REFERER%22+%22Oilfield+Workers+Registry%22&btnG=Search&hl=en[/url]

When you go to the page yourself, you don’t see the Notice…

Is this because the variable is not set when the google spider is indexing webpages? Or why is it?

What can I do to prevent it? I already did some research; is this a good solution:

[code=php]$log_referer = (isset($_SERVER[‘HTTP_REFERER’])) ? $_SERVER[‘HTTP_REFERER’] : “”;[/code]

?

Thx
Bobby

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@bokehApr 28.2007 — is this a good solution[/QUOTE]Yes! or just do this:[code=php]@$_SERVER['HTTP_REFERER'][/code]
×

Success!

Help @Bobby_S spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...