title: installing codeigniter sparks manager on windows
body: <p><strong>SOLVED, read bottom of post:</strong></p>
  
  <p>I'm trying to install the Sparks package manager on windows by following the <a href="http://getsparks.org/install" rel="nofollow">official instructions</a>.
  Issuing this command:</p>
  
  <pre><code>php -r "$(curl -fsSL http://getsparks.org/go-sparks)"
  </code></pre>
  
  <p>results in this errormessage:</p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected ':' in Command line code on line 1</p>
  </blockquote>
  
  <p>If I only execute the curl command within the above line, i.e this:</p>
  
  <pre><code>curl -fsSL http://getsparks.org/go-sparks
  </code></pre>
  
  <p>it echoes out the php script located on the URL. So I think the problem is piping the curl output to PHP somehow fails. I've tried a couple of variants, using diffrent quotes etc but I'm at a loss.</p>
  
  <p><strong>MY SOLUTION</strong>
  As DaveRandom pointed out, the instruction didn't apply to windows.</p>
  
  <p>But instead of doing it the manual(normal) way, what I did was taking the output from curl, appending php script tags and executing it as a file with the php -f option.</p>
  
  <p>Here is the output:</p>
  
  <pre><code>&lt;?php
  $zip    = "http://getsparks.org/static/install/spark-manager-0.0.7.zip";
  $loader = "http://getsparks.org/static/install/MY_Loader.php.txt";
  
  if(!file_exists("application/core"))
  {
      echo "Can't find application/core. Currently this script only works with the default instance of Reactor. You may need to try a manual installation..\n";
      exit;
  }
  
  echo "Pulling down spark manager from $zip ...\n";
  copy($zip, "sparks.zip");
  
  echo "Pulling down Loader class core extension from $loader ...\n";
  copy($loader, "application/core/MY_Loader.php");
  
  echo "Extracting zip package ...\n";
  if(class_exists('ZipArchive'))
  {
      $zip = new ZipArchive;
      if ($zip-&gt;open('sparks.zip') === TRUE)
      {
          $zip-&gt;extractTo('./tools');
          $zip-&gt;close();
      } else {
          echo "Extraction failed .. exiting.\n";
          exit;
      }
  } elseif(!!@`unzip`) {
      `unzip sparks.zip -d ./tools`;
  } else
  {
      echo "It seems you have no PHP zip library or `unzip` in your path. Use the manual installation.\n";
      exit;
  }
  
  echo "Cleaning up ...\n";
  @unlink('sparks.zip');
  
  echo "Spark Manager has been installed successfully!\n";
  echo "Try: `php tools/spark help`\n";
  </code></pre>