Ben bu vardı:
final public function __construct()
{
  $this->_host = 'ssl://myserver.com';
  $this->_porto = 700;
  $this->_filePointer = false;
  try
  {
    $this->_filePointer = fsockopen($this->_host, $this->_porto);
    if ($this->_filePointer === FALSE)
    {
       throw new Exception('Cannot place filepointer on socket.');
    }
    else
    {
       return $this->_filePointer;
    }
 }
 catch(Exception $e)
 {
            echo "Connection error: " .$e->getMessage();
 }
}
: Ben ekledim ama ben bu sınıf için bir zaman aşımı seçeneği eklemek istiyorum
final public function __construct()
{
  $this->_host = 'ssl://myserver.com';
  $this->_porto = 700;
  $this->_filePointer = false;
  $this->_timeout = 10;
  try
  {
    $this->_filePointer = fsockopen($this->_host, $this->_porto, '', '', $this->_timeout);
    if ($this->_filePointer === FALSE)
    {
       throw new Exception('Cannot place filepointer on socket.');
    }
    else
    {
       return $this->_filePointer;
    }
 }
 catch(Exception $e)
 {
            echo "Connection error: " .$e->getMessage();
 }
}
Ben bir hata söyleyerek alıyorum: ". Only variables can passed by reference"
Ne oluyor?
Update: The error: "Only variables can be passed by reference" is related to this line:
$this->_filePointer = fsockopen($this->_host, $this->_porto, '', '', $this->_timeout);
Thanks a lot, MEM
