Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Downloading files via Diagnostics->Execute command?

    Scheduled Pinned Locked Moved webGUI
    4 Posts 2 Posters 3.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wmsigler
      last edited by

      I'm trying to download files off my website to the pfsense box via the webGUI. I put in the download box the url, i.e. http://www.url.com/thefile.txt,
      but when I try to edit the file via the appropriate window, it says it's not found. I'm not sure if it's not downloaded correctly or if it's in a different directory?
      Could someone help me out? Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • W
        wmsigler
        last edited by

        Okay I think the download box is actually for downloading things to a computer while remotely being connected to the box, but is there a way to have the box download something, i.e. via a PHP script? Thanks!

        1 Reply Last reply Reply Quote 0
        • W
          wmsigler
          last edited by

          I figured it out, by using the PHP script and file_get_contents($url).

          1 Reply Last reply Reply Quote 0
          • C
            cybrsrfr
            last edited by

            Diagnostics -> Command -> Shell command

            Then use 'fetch' with the URL. Fetch will work fine from the console or the GUI.

            If its your own php page you could run.
            chdir('path you want');
            exec('fetch http://example.com');

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.