title: jpegcam with codeigniter
body: <p><code>&lt;script language="JavaScript"&gt;
          webcam.set_api_url( 'test.php' );
          webcam.set_quality( 90 ); // JPEG quality (1 - 100)
          webcam.set_shutter_sound( true ); // play shutter click sound
  &lt;/script&gt;</code></p>
  
  <p>i try jpegcam in my website (i use codeigniter).
  and i cant load my webcam.swf or webcam.php or test.php.
  how can i reach php in javascript loke this in codeigniter? </p>
  
  <p>when i refresh my website theres nothing to do there, but when i try the jpegcam (without codeigniter) its works well.  sorry for my silly question, im new with codeigniter,</p>
  
  <pre><code>&lt;table&gt;&lt;tr&gt;&lt;td valign=top&gt;
  &lt;h1&gt;JPEGCam Test Page&lt;/h1&gt;
  
  &lt;!-- First, include the JPEGCam JavaScript Library --&gt;
  &lt;script type="text/javascript" src="webcam.js"&gt;&lt;/script&gt;
  
  &lt;!-- Configure a few settings --&gt;
  &lt;script language="JavaScript"&gt;
      webcam.set_api_url( 'test.php' );
      webcam.set_quality( 90 ); // JPEG quality (1 - 100)
      webcam.set_shutter_sound( true ); // play shutter click sound
  &lt;/script&gt;
  
  &lt;!-- Next, write the movie to the page at 320x240 --&gt;
  &lt;script language="JavaScript"&gt;
      document.write( webcam.get_html(320, 240) );
  &lt;/script&gt;
  
  &lt;!-- Some buttons for controlling things --&gt;
  &lt;br/&gt;&lt;form&gt;
      &lt;input type=button value="Configure..." onClick="webcam.configure()"&gt;
      &amp;nbsp;&amp;nbsp;&amp;nbsp;
      &lt;input type=button value="Take Snapshot" onClick="webcam.snap()"&gt;
  &lt;/form&gt;
  
  &lt;!-- Code to handle the server response (see test.php) --&gt;
  &lt;script language="JavaScript"&gt;
      webcam.set_hook( 'onComplete', 'my_completion_handler' );
  
      function my_completion_handler(msg) {
          // extract URL out of PHP output
          if (msg.match(/(http\:\/\/\S+)/)) {
              var image_url = RegExp.$1;
              // show JPEG image in page
              document.getElementById('upload_results').innerHTML = 
                  '&lt;h1&gt;Upload Successful!&lt;/h1&gt;' + 
                  '&lt;img src="'+image_url+'"&gt;';
          }
          else alert("PHP Error: " + msg);
      }
  &lt;/script&gt;
  
  &lt;/td&gt;&lt;td width=50&gt;&amp;nbsp;&lt;/td&gt;&lt;td valign=top&gt;
      &lt;div id="upload_results"&gt;&lt;/div&gt;
  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  </code></pre>
  
  <p>please help me, thanks a lot</p>