View Single Post
ישן 28-10-08, 17:36   # 8
vadimg88
חבר מתקדם
 
מיני פרופיל
תאריך הצטרפות: Feb 2008
גיל: 37
הודעות: 710

vadimg88 לא מחובר  

נסה את זה , זה עובד לי מצויין:

קוד:
<?php


$host = 'domain.com'; // gateway host
$path = '/file.php'; // gateway uri
$autotaxusername = "***";
$autotaxpass = "*****";

$fh = fsockopen("$host", 80, $errno, $error, 15);
if ($fh)
{
	$params = "phone=".$phone."&message=".urlencode($message);
	$headers = array
	(	"Host: $host",
	"Connection: close",
	"Cookie: username=".$autotaxusername."; password=".$autotaxpass,
	"Content-Length: ".strlen($params),
	"Content-Type: application/x-www-form-urlencoded"
	);
	fwrite($fh, "POST $path HTTP/1.1\r\n".implode("\r\n", $headers)."\r\n\r\n");
	fwrite($fh, $params);
	$data = '';
	/*(for ($i=0; !feof($fh) && $i<20; $i++)
	{
	$data .= fgets($fp, 1024);
	}*/
	$data .= fread($fh, 5000);
	fclose($fh);

}

?>
  Reply With Quote