Php and javascript

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
php-forum Active User
php-forum Active User
Posts: 388
Joined: Thu Mar 15, 2012 3:59 pm

Wed Aug 06, 2014 2:50 am

I've only used curl a couple of times and so I don't know about any tricks to call javascript, but IHMO it is unlikely since js is executed by the browser, and curl does not emulate a browser, it just retrieves data using http etc.

I'm not sure WHY you want to do this, so it is difficult to think of alternatives but assuming you are trying to print a report that you can get after selecting multiple parameters from the drop downs, then one of these ideas might help:

1) If you only need one set of values, set the drop downs manually to those values and look at the final url that is called. It's probably something like run_report.aspx?acedemic_year=2012&semester=fall. You could then use curl to call that directly.

2) Or: If you need to change the parameters, then find out where jquery is getting the values from, and get them yourself and then do (1)

3) Or: Write a php page to run the javascript and call that from the browser that is runing the page you write (maybe in an iframe).

Hope that helps

Post Reply