Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7695215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:29:52+00:00 2026-05-31T21:29:52+00:00

Is there a way in which I can detect the URL that is calling

  • 0

Is there a way in which I can detect the URL that is calling in my php page, similar to say a GET or POST but would like to get the URL as I would like to restrict the page accessing it to a certain URL as this file is being called from another server.

Basically: http://www.MYURL.com calls the php file from say http://www.PHPURL.com if the URL is NOT http://www.MYURL.com then bounce them out etc.

Many Thanks

In response to the answers below I used the as mentioend and here is what I did:

  $URL_REF = parse_url($_SERVER['HTTP_REFERER']);
  $URL_REF_HOST =   $URL_REF['host'];

Thanks @Philip Bevan,@Itai Sagi and @EvilP

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:29:54+00:00Added an answer on May 31, 2026 at 9:29 pm

    well, you could use $_SERVER['HTTP_REFERER'] – but it can be cloaked/removed.

    EDIT: as someone asked, the HTTP_REFERER is a header which is sent by the client, most browsers default behavior is to send it, but if you’d like, you can disable it or even send a different referer header so people will think you come from some place else.

    the bottom line: if it isn’t THAT critical for you, you can use it, but don’t EVER, EVER give people extra privileges based on their referer alone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way that we can detect which side the Alt key was
Is there any way that I can list the pages which are currently stored
Is there any way by which I can detect if QDial (with wrapped property
Is there a way in which I can detect when specifically text is being
Is there any way in which we can detect status of incoming call in
in Microsoft Access, is there a way which I can programatically set the Confirm
Is there any way by which we can export the result of a select
Is there a way by which we can simulate thread level constants in C++?
is there any way via which we can interact to iphone scheduler and insert
I want to know if there is any way by which I can paste

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.