Autor Zpráva
jokerxyz
Profil *
Zdravim,

mam tuhle funkci:
		function connect($host, $port=700, $timeout=20, $ssl=true) {
			$target = sprintf('%s://%s:%d', ($ssl === true ? 'sslv3' : 'tcp'), $host, $port);
			
  $context = stream_context_create(array(
  'ssl'=>array('allow_self_signed'=> 'true',
  'local_cert'=> '/var/www/web5/gigaserver.cz/gigaserver.cz/pk.pem',
  'capath'=> '/var/www/web5/gigaserver.cz/gigaserver.cz/',
  'cafile'=> 'cert.pem',
  'verify_peer'=> 0,
)));

if (!$this->socket = stream_socket_client   ($target , $errno, $errstr, $timeout,STREAM_CLIENT_PERSISTENT, $context)){
die();
			} else {
	print_r($this->socket);
			 echo stream_get_contents($this->socket);
				return $this->getFrame();

			}

		}


Teoreticky by mela vratit greating serveru. Ale nevraci. Nevraci nic. Kdyz zmenim STREAM_CLIENT_PERSISTENT na default, tak skript jen cykli a cykli a nic z nej.

Pro vysvetlenou - potrebuji se spojit se serverem pomoci dodaneho certifikatu. Pokud zna nekdo jiny postup, predem moooooc diiiky!

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0