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 3986202
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:59:00+00:00 2026-05-20T05:59:00+00:00

I am using linux cpanel shared hosting. Am using http://aaa.com/script.php to scrape data from

  • 0

I am using linux cpanel shared hosting.

Am using http://aaa.com/script.php to scrape data from other website.

PHP portion is to curl call to read whole page content, then on the page, will output the full content as html, then use jquery scrapping & ajax call to insert final data into mysql.

(I decided to go for jquery client side scrapping because the page with html to scrap is pretty complicated, and hard to achieve with phpsimpledom and regex.)

I want this page to stop outputting html when it is
– not open by me as a tester
– not open by local cpanel cron task.

So I put exit(); at the top few lines.
If detected is legitimate, then will continue the rest of the html outputs at bottom, else, just exit and show an empty page.

Now is security issue, what’s the possible and best way for me to make sure other visitors/bots to this page will see empty page.

If I put a password to cron task, I don’t think it can work right?
Because at script.php I am scrapping data, so if the website owner see the visitor referral log, he can see the full url including ?password=12345, isn’t it.

/usr/local/bin/php -f /home/mysite/public_html/dir/script.php?password=12345

If I put my script outside of public_html, like /usr/local/bin/php -f /home/mysite/script
I don’t think it will work for jquery, it is purely for php isn’t it?

What else I can do??

  • 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-20T05:59:00+00:00Added an answer on May 20, 2026 at 5:59 am

    Passwords on the query string are a bad idea. You could check for valid IP addresses at the start of your PHP file. This will allow any request from a set of IP addresses to access the parsed jQuery output. All other IPs will be denied access.

    $allowedIps = array('127.0.0.1','::1');
    if(!in_array($_SERVER['REMOTE_ADDR'],$allowedIps)){
        echo 'No jQuery for you';
    }else{
        echo 'jQuery goodness to follow...';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a shared hosting through CIPL.in. They use cpanel. I am trying
I'm currently developing a website which stores bookmarks in a MySQL database using PHP
Example, I have 2 server, each server using a copy of linux cpanel. I
I recently started using Linux as my primary OS. What are the tools that
I would like to develop Adobe Flex applications using Linux and a free environment.
I'm currently using a linux server, we run a couple of web sites of
I'm fine working on Linux using gcc as my C compiler but would like
What is the easiest way using common linux tools to check if a bunch
I'm writing a Java application that runs on Linux (using Sun's JDK). It keeps
I want to start learning HTML and AJAX using a Linux distribution. Can anyone

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.