Προς το περιεχόμενο

Domain EPP


CyberCr33p

Προτεινόμενες αναρτήσεις

Δημοσ.

Προσπαθώ να συνδεθώ στο https://devepp.ics.forth.gr:700/epp/proxy χρησιμοποιώντας το παρακάτω αρχείο:

 

>
<?php

/*	EPP Client class for PHP, Copyright 2005 CentralNic Ltd
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/**
* A simple client class for the Extensible Provisioning Protocol (EPP)
* @package Net_EPP_Client
* @version 0.0.3
* @author Gavin Brown <[email protected]>
* @revision $Id: Client.php,v 1.8 2007/05/25 09:26:49 gavin Exp $
*/

require_once('PEAR.php');

$GLOBALS[Net_EPP_Client_Version] = '0.0.3';

/**
* A simple client class for the Extensible Provisioning Protocol (EPP)
* @package Net_EPP_Client
*/
class Net_EPP_Client {

	/**
	* @var resource the socket resource, once connected
	*/
	var $socket;

	/**
	* Establishes a connect to the server
	* This method establishes the connection to the server. If the connection was
	* established, then this method will call getFrame() and return the EPP <greeting>
	* frame which is sent by the server upon connection. If connection fails, then
	* a PEAR_Error object explaining the error will be returned instead.
	* @param string the hostname
	* @param integer the TCP port
	* @param integer the timeout in seconds
	* @param boolean whether to connect using SSL
	* @return PEAR_Error|string a PEAR_Error on failure, or a string containing the server <greeting>
	*/
	function connect($host, $port=700, $timeout=1, $ssl=true) {
		$target = sprintf('%s://%s:%d/epp/proxy', ($ssl === true ? 'ssl' : 'tcp'), $host, $port);
		if (!$this->socket = @fsockopen($target, $errno, $errstr, $timeout)) {
			return new PEAR_Error("Error connecting to $target: $errstr (code $errno)");

		} else {
			return $this->getFrame();

		}

	}

	/**
	* Get an EPP frame from the server.
	* This retrieves a frame from the server. Since the connection is blocking, this
	* method will wait until one becomes available. If the connection has been broken,
	* this method will return a PEAR_Error object, otherwise it will return a string
	* containing the XML from the server
	* @return PEAR_Error|string a PEAR_Error on failure, or a string containing the frame
	*/
	function getFrame() {
		if (@feof($this->socket)) return new PEAR_Error('connection closed by remote server');

		$hdr = @fread($this->socket, 4);

		if (empty($hdr) && feof($this->socket)) {
			return new PEAR_Error('connection closed by remote server');

		} elseif (empty($hdr)) {
			return new PEAR_Error('Error reading from server: '.$php_errormsg);

		} else {
			$unpacked = unpack('N', $hdr);
			$length = $unpacked[1];
			if ($length < 5) {
				return new PEAR_Error(sprintf('Got a bad frame header length of %d bytes from server', $length));

			} else {
				return fread($this->socket, ($length - 4));

			}
		}
	}

	/**
	* Send an XML frame to the server.
	* This method sends an EPP frame to the server.
	* @param string the XML data to send
	* @return boolean the result of the fwrite() operation
	*/
	function sendFrame($xml) {
		fwrite($this->socket, pack('N', (strlen($xml)+4)).$xml);

	}

	/**
	* a wrapper around sendFrame() and getFrame()
	* @param string $xml the frame to send to the server
	* @return PEAR_Error|string the frame returned by the server, or an error object
	*/
	function request($xml) {
		$this->sendFrame($xml);
		return $this->getFrame();
	}

	/**
	* Close the connection.
	* This method closes the connection to the server. Note that the
	* EPP specification indicates that clients should send a <logout>
	* command before ending the session.
	* @return boolean the result of the fclose() operation
	*/
	function disconnect() {
		return @fclose($this->socket);
	}

}

?>

 

Ο δικός μου κώδικας περιέχει:

 

>
<?php
require('Client.php');

$client = new Net_EPP_Client;
$host = 'devepp.ics.forth.gr';
$port = 700;
$timeout = 10;
$ssl = true;

$greeting = $client->connect($host, $port, $timeout, $ssl);

echo $greeting;
?>

 

Μετά από λίγη ώρα ο browser εμφανίζει το εξής μήνυμα:

 

connection closed by remote server

 

Κάποια βοήθεια;

  • 8 μήνες μετά...
  • 7 μήνες μετά...
Δημοσ.
σε περίπτωση που δεν έχεις βρει ακόμα απάντηση...

 

σε λίγες μέρες βγαίνει η πρώτη έκδοση του eppKernel (module του eppNet), ρίξε μια ματιά στο http://www.eppnet.gr

 

---

 

 

Προσπάθησα να μιλήσω τηλεφωνικώς εδώ και πολύ καιρό μαζί τους κατά διαστήματα και τίποτα... ουδείς σηκώνει τηλέφωνο.

ίσως έβαλαν λουκέτο

Αρχειοθετημένο

Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.

  • Δημιουργία νέου...