This topic is locked

Export triggered via POST / GET

1/19/2014 4:40:12 PM
PHPRunner General questions
S
Stucco author

Hi,
Is it possible to activate an export action via a single URL?
I am using dynamic user authentication. I would like to make a system account, with a username and difficult password, that can authenticate and execute an export in a single web request. The response would be the export file.
Is this possible?
Thanks!!

Sergey Kornilov admin 1/20/2014

Yes, this can be done, here is an example:
Cars_export.php?records=all&type=excel2007
records parameter can be either all or page

type parameter can be excel2007, excel5, csv, word or xml.

S
Stucco author 3/2/2014

Hi,
That works if I am logged in, but I would like the login action to be included in the single URL as well.
For example: Carsexport.php?records=all&type=excel2007&username=____&password=____
This is over https of course.
Maybe I could provide the return url to the login page as a parameter?
Thanks!

Sergey Kornilov admin 3/2/2014

I think you can implement BeforeProcess event of the export page in question. If user is not logged in and username/password are in the URL then validate username/password and either proceed with export or display some sort of message and stop.