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

  • SEARCH
  • Home
  • 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 8265181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:42:37+00:00 2026-06-08T04:42:37+00:00

Is it possible for PHP to obtain the certificate of the request, and in

  • 0

Is it possible for PHP to obtain the certificate of the request, and in particular the website name on the certificate and the CA?

I want to check that a call to my PHP file can only be made from my website via an AJAX call. Like this:

  1. User logs onto my website and then uses https for subsequent interaction
  2. User loads a page https:// domain/mypage.php
  3. https:// domain/mypage.php has an AJAX call to https:// domain/getinfo.php

in getinfo.php I want to check the certificate details of the request to ensure that the request was made from my website, i.e. not from a direct hit on the URL, or using a scraping tool.

Possible?

  • 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-06-08T04:42:38+00:00Added an answer on June 8, 2026 at 4:42 am

    I’m trying to ensure that the calls to my getinfo.php originate from my website and not from someone trying to steal my (very expensive) data by just hitting the URL.

    You mean you want to ensure that calls to your getinfo.php originate from a client that is visiting your website? That’s kind of an important distinction. “Your site” doesn’t originate requests, the client visiting the site is. And whether or not the client still has your site open when it’s sending the request is impossible to detect, each request looks exactly like any other.

    You could require the client to send a token in the request which he must have gotten when opening your site. Typically that’s a cookie and/or session id. Without a valid cookie/session, you won’t answer the client.

    That still makes it perfectly possible to scrape the data without actually opening your page, just make one request to get the cookie and another to get the data.

    For all intents and purposes, if the API/site is public, so is the data. If you really want to protect it, you’ll have to require user authentication and be careful who you’re giving those accounts to. That also enables auditing and possible banning of users which appear to scrape your data.

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

Sidebar

Related Questions

Possible Duplicate: PHP create a file without fopen I want to create a file
Possible Duplicate: PHP 2-way encryption: I need to store passwords that can be retrieved
Possible Duplicate: PHP pagination class are there any PHP/Class libraries that i can utilize
Possible Duplicate: PHP 2-way encryption: I need to store passwords that can be retrieved
Possible Duplicate: php false place in condition I have noticed that a lot of
Possible Duplicate: PHP remove special character from string I want to find a regex
Possible Duplicate: PHP PDO: Can I bind an array to an IN() condition? I
Possible Duplicate: Super fast getimagesize in php I want to get the image sizes
Possible Duplicate: PHP: How to remove specific element from an array? How can i
Possible Duplicate: PHP and Enums I want to create a function with several parameters

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.