EMB01
asked on
Run JavaScript Function Remotely with PHP
If I have a PHP script that loads the content of an external HTML page, for instance:
fopen("http://www.example.com", "r");
Is it possible to execute JavaScript commands that exist on that page? For example, if a button exists on that page like:
<a href="" onclick="javascript...">Li nk</a>
Could I run that JavaScript from my PHP script?
fopen("http://www.example.com", "r");
Is it possible to execute JavaScript commands that exist on that page? For example, if a button exists on that page like:
<a href="" onclick="javascript...">Li
Could I run that JavaScript from my PHP script?
PHP is server side, JS is client side. You cannot run JS directly in PHP.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.