Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function open() {
- $errno = null;
- $errstr = null;
- $socket = JAVA_PERSISTENT_SERVLET_CONNECTIONS ?
- pfsockopen("{$this->ssl}{$this->host}", $this->port, $errno, $errstr, 20) :
- fsockopen("{$this->ssl}{$this->host}", $this->port, $errno, $errstr, 20);
- if (!$socket)
- 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");
- stream_set_timeout($socket, -1);
- return $socket;
- }
- function java_HttpHandler($protocol, $ssl, $host, $port) {
- parent::java_SimpleHttpHandler($protocol, $ssl, $host, $port);
- try {
- $this->socket = $this->open();
- } catch (Exception $e) {
- $cogLink = "http://xxxx.xx.com/products/sup_products.asp?prod_id=81174";
- echo "eeeeerrrr";
- }
- }
Add Comment
Please, Sign In to add comment