itop.wsdl.php 599 B

123456789101112131415161718192021
  1. <?php
  2. // This is to make sure that the client will accept it....
  3. //
  4. header('Content-Type: application/xml; charset=UTF-8');
  5. //header('Content-Disposition: attachment; filename="itop.wsdl"');
  6. header('Content-Disposition: online; filename="itop.wsdl"');
  7. $sMyWsdl = './itop.wsdl.tpl';
  8. $sRawFile = file_get_contents($sMyWsdl);
  9. $sServerURI = 'http'.(empty($_SERVER['HTTPS']) ? '' : 's').'://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME']).'/soapserver.php';
  10. $sFinalFile = str_replace(
  11. '___SOAP_SERVER_URI___',
  12. $sServerURI,
  13. $sRawFile
  14. );
  15. echo $sFinalFile;
  16. ?>