There is a page in the thinkphp framework that needs to be scheduled daily, the server is Linux, Access has login restrictions, how to resolve

Source: Internet
Author: User
Need to run a PHP program every night to process data

It is currently written in a PHP page within the framework of the project Linux scheduled task wget Access this page address prompt not logged in

How to resolve whether there is a better way to implement a timed execution


Reply to discussion (solution)

Remove the login restrictions, and then in the head plus IP judgment, as long as the non-native IP, all do not allow access

Have your own programs limited yourself?

Remove the login restrictions, and then in the head plus IP judgment, as long as the non-native IP, all do not allow access


Because this page is within the project, the entire project can not be removed from the login restrictions if there is a way to remove the current page (inheriting a class, in the Class A _initialize method to verify whether login) login verification can also ask


Remove the login restrictions, and then in the head plus IP judgment, as long as the non-native IP, all do not allow access


Because this page is within the project, the entire project can not be removed from the login restrictions if there is a way to remove the current page (inheriting a class, in the Class A _initialize method to verify whether login) login verification can also ask


You can just put this piece into a model or module, and that's it.
If you can not change, but also to log in, then you black yourself, or you add a back door to the program or the exception

1. You can use curl to simulate landing
2, remember the login information of an account, get its COOKIE, and then use the Curlopt_cookie in curl, and then directly access

I think you have a little bit of a hole in yourself, generally. If a URI is simply performed by the database Operations department, you can write a script alone, why not rely on the original framework? If there is a part of the logic to be based on the framework, you can pick out copy a good, anyway, is an automatic script does not occupy much of the resource consumption.

I think you have a little bit of a hole in yourself, generally. If a URI is simply performed by the database Operations department, you can write a script alone, why not rely on the original framework? If there is a part of the logic to be based on the framework, you can pick out copy a good, anyway, is an automatic script does not occupy much of the resource consumption.





1. You can use curl to simulate landing
2, remember the login information of an account, get its COOKIE, and then use the Curlopt_cookie in curl, and then directly access








Remove the login restrictions, and then in the head plus IP judgment, as long as the non-native IP, all do not allow access


Because this page is within the project, the entire project can not be removed from the login restrictions if there is a way to remove the current page (inheriting a class, in the Class A _initialize method to verify whether login) login verification can also ask


You can just put this piece into a model or module, and that's it.
If you can not change, but also to log in, then you black yourself, or you add a back door to the program or the exception






Have your own programs limited yourself?



The solution has been solved very simple, in determining whether to log on when the controller and the method to join the exclusion list is I think more ...
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.