PHP scandir of an url
<p>How can I use scandir with an URL. Now it looks like PHP doesn't see the URL as an URL. Is there a way to use an URL in scandir? </p>

<pre><code>&lt;form action="new_exercise.php?id=&lt;?php echo $new_id; ?&gt;" method="post"&gt;
        &lt;input class="" type="text" name="name_exe" required placeholder="Project naam"&gt;
        &lt;select name="audio" required&gt;
          &lt;option&gt;&lt;/option&gt;
          &lt;?php
          $path = 'URL comes here';
          $results = scandir($path);
          foreach ($results as $result) {
              if ($result === '.' or $result === '..') continue;

              if (is_dir($path . '/' . $result)) {
                  echo "&lt;option&gt;" . $result . "&lt;/option&gt;";
              }
          }
          ?&gt;
        &lt;select&gt;
        &lt;input class="btn-success" type="submit" name="submit" value="Maak nieuwe opdracht"&gt;
    &lt;/form&gt;
</code></pre>