>I'm fiddling around with the fopen function, using it on urls. I now need
to know how to run >a JavaScript on another page by using PHP. I know I'll
be able to do it from the url if only >there's a way to run JavaScript from
the url (just by using an fopen). Is there a way to run >a JavaScript
function from a url, or from PHP? For example:
>
>Would I be able to type something like:
>
>http://www.someurl.com/filename/javascript:javascriptname?parameterlist=val
uelist&
>
>or is there a way PHP can do this??
JavaScript runs in the browser.
PHP runs on your server.
They don't really run "together" in any way, shape, or form.
You can have your PHP script spew out a page with lots and lots of
JavaScript in it to be run on somebody's browser, based on the input
parameters, if that's what you are asking. PHP doesn't really care if it
spits out HTML, JavaScript, or complete and utter nonsense to your browser.
If what you are asking is "Can I read somebody else's page with JavaScript
in it, and execute that JavaScript as I read it", the answer is this:
*MAYBE*, if you really worked at it, you could... You'd have to store it in
a local file, or pipe it through to Netscape or whatever browser is
installed on your web-server, if any. You wouldn't really have any way of
getting the "output" from the JavaScript, though, I don't think. It also
sounds like a horrible idea security-wise... Although, I guess, in theory,
it's no different from surfing to their site with your browser if you do it
right. But why you want to do this is beyond me.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]