title: PHP Communicating w/ Java program
body: <p>We're come across a problem here at my company and I'm trying to find the best solution.  </p>
  
  <p>Software was recently purchased that utilizes a Java program to get the tax for a certain shipment.  The site that needs this was written in PHP4.  How can I communicate between the two?</p>
  
  <p>It was suggested to use files to communicate but that was horribly slow since the Java program needed to be recompiled every time.  So, what is the best solutions to this:</p>
  
  <ol>
  <li> Create a mutli-threaded Java server and use PHP to send/receive the info.</li>
  <li> Some other type of file-writing method</li>
  <li> Something cool that I dont even know about.</li>
  </ol>
  
  <p>Thanks in advance!</p>
  
  <p><strong>Edit:</strong> 
  I understand the importance of web services but why would this be more efficient that using a mutli-threaded socket-based java server?  The only thing connecting to this web services will be my PHP program, no one else.  It seems like it might be overkill for my simple task.  Am I mistaken?  If so, why?  Thanks.</p>