Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Export csv to ftp server

  • jvrool
  • jvrool's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 days ago #167030 by jvrool
Export csv to ftp server was created by jvrool
I would like to store my csv documents on the ftp server instead of downloading.

I want to know how i can select the generated csv document so i can store it on the ftp server.

The script needs to start running when the enquete export page has url "/autoexport" in it.

This is where i came up with:
Code:
<?php
        $url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
        if (strpos($url, "/autoexport")!==false){ ignore_user_abort(true); ?>
        <script>
            $(document).ready(function(){
                $('#tcontrol option').prop('selected', true);
                document.getElementById('resultexport').submit();
            });
        </script>
        <?php } ?>

If anyone can help me storing the csv documents on the ftp server with a script.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose