Guest User

Untitled

a guest
Jan 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. function open() {
  2. $errno = null;
  3. $errstr = null;
  4. $socket = JAVA_PERSISTENT_SERVLET_CONNECTIONS ?
  5. pfsockopen("{$this->ssl}{$this->host}", $this->port, $errno, $errstr, 20) :
  6. fsockopen("{$this->ssl}{$this->host}", $this->port, $errno, $errstr, 20);
  7. if (!$socket)
  8. throw new java_ConnectException("Could not connect to the J2EE server {$this->ssl}{$this->host}:{$this->port}. Please start it. Or define('JAVA_HOSTS', 8080); define('JAVA_SERVLET', false); before including 'Java.inc' and try again. Error message: $errstr ($errno)n");
  9. stream_set_timeout($socket, -1);
  10. return $socket;
  11. }
  12.  
  13. function java_HttpHandler($protocol, $ssl, $host, $port) {
  14. parent::java_SimpleHttpHandler($protocol, $ssl, $host, $port);
  15. try {
  16. $this->socket = $this->open();
  17. } catch (Exception $e) {
  18. $cogLink = "http://xxxx.xx.com/products/sup_products.asp?prod_id=81174";
  19. echo "eeeeerrrr";
  20. }
  21. }
Add Comment
Please, Sign In to add comment