With PHP basic auth to webpage and then with php emulate click on link on that page


I can not solve this - looking for ways to have a php function that does this:

- Basic Auth to a webpage
- "Click" an element on that webpage to trigger a jQuery action that is tied to this button
- or trigger that jQuery function directly

Any ideas?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
I don't think that will ever work.  PHP is not a browser and does not run Javascript or Jquery.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
I agree with Dave. As your question is stated, you're taking Javascript vs. PHP... two different beasts...

Normally the way this is accomplished is via AJAX. Maybe that's what you're asking.

You PHP serves content, including Javascript which executes + does callbacks to server to instantiate a session.

If you're new to this type of logic/coding, load up a copy of WordPress + decode how they handle this + also look at admin-ajax.php which provides the plumbing for continual round trips between browser <-> server, to transmit browser data + then change browser data based on returned server data.
Julian HansenCommented:
Why do you want to do this?
netsltAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.