0

I have a PHP code that send e-mails and I have a html page that contains a button to run the PHP script with post method. Is there a way to run this script without recourse to the html page every time i want to send the e-mails?

1

2 Answers 2

1

If you're on Linux you can use cron.

Sign up to request clarification or add additional context in comments.

2 Comments

I'm hosting my files in a hosting company server. I have only Cpanel.
You may need to upgrade your hosting account to one with access to SSH or a more feature-rich admin panel. Contact your company's customer service and ask them if they offer a package that will allow you to set up cron jobs. If they do not you might want to look into switching hosting companies.
1

why don't you just call the php file or php function ?

1 Comment

Is there a way to call a PHP file without using a html webpage?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.