Webtolead with Socket
Webtolead with Socket
Hello ,I would like to send post data via PHP-fsockopen to the WeToLead list of my CRM. Unfortunately it does not work. Is it allowed or do I have to consider something?
Thank for the help, and Sorry for my bad english
my code
$da = fsockopen($host, 80, $errno, $errstr);
$http_fake ="POST $uri HTTP/1.1\r\n";
$http_fake.="Host: $host\r\n";
$http_fake.="User-Agent: PHP REQUEST\r\n";
$http_fake.="Content-Type: application/x-www-form-urlencoded\r\n";
$http_fake.="Content-Length: ".strlen($postdata)."\r\n";
$http_fake.="Connection: keep-alive\r\n\r\n";
$http_fake.=$postdata;
fwrite($da, $http_fake);
while (!feof($da))
$response.=fgets($da, 128);
$response=split("\r\n\r\n",$response);
......