ya lo hice y aun no logro enviar variables simulando el metodo post hata el momento he echo esto pero aun no me funciona es una autentificacion la que tengo que efectuar, aqqui esta el codigo que tengo.
Código PHP:
$sock = fsockopen("ssl://paginasegurafinal.com", 443, $errno, $errstr, 30);
if (!$sock) die("$errstr ($errno)\n");
$datos = "login_username=". urlencode("$login_username")."&login_password=".urlencode("$login_password");
fwrite($sock, "POST /cgi-bin/autentifica.cgi HTTP/1.0\r\n");
fwrite($sock, "Host: paginasegurafinal.com\r\n");
fwrite($sock, "Content-type: application/x-www-form-urlencoded\r\n");
fwrite($sock, "Content-length: " . strlen($datos) . "\r\n");
fwrite($sock, "Accept: */*\r\n");
fwrite($sock, "\r\n");
fwrite($sock, "$data\r\n");
fwrite($sock, "\r\n");
$cabeceras = "";
while ($cadena = trim(fgets($sock, 4096)))
$cabeceras .= "$cadena\n";
echo "\n";
$cuerpo = "";
while (!feof($sock))
$cuerpo .= fgets($sock, 4096);
fclose($sock);
si alguien puede decirme por favor si lo estoy haciendo bien o donde me estoy equivocando muchas gracias.