Re: post xml file

From: Date: Mon, 03 Mar 2003 20:02:27 +0000
Subject: Re: post xml file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-137965@lists.php.net to get a copy of this message
Dear Sirs, I try to post xml file with following script; Until today I was using following script for http post. But now I shoul post https. When I changing HTTP to HTTPS, I am getting this error Bad Request HTTP/1.1 400 Bad Request Date: Mon, 03 Mar 2003 21:07:18 GMT Server: Apache/1.3.27 (Unix) Connection: close Content-Type: text/html; charset=iso-8859-1 Any idea, am I doing right to use following method to post xml file. And why I can not post https? ----------------------------------------------- $str = "xml markuped text........."; $len = strlen($str); $p = "POST /servlet/com.oksijen.bulkmessaging.xml.SmsToMany HTTP/1.1\r\n"; $p.= "Host: 212.65.135.163 \r\n"; $p.= "Content-type: application/x-www-form-urlencoded\r\n"; $p.= "Content-length: $len\n\n"; $p.= "$str\n"; $p.= "\r\n"; $server = "212.65.135.163"; $connection_timeout = 10; $fp = fsockopen ($server, 80, &$errno, &$errstr, $connection_timeout); fputs ($fp,$p); $recdata = ""; while (!feof($fp)) { $recdata .= fgets ($fp,128); print "$recdata"; } fclose ($fp); $sonuc = trim(substr($recdata,-19)); $pos = 0; $pos = strpos($recdata, "Message Failed"); "Qt" <web_tur@yahoo.com> wrote in message news:20030303180849.42359.qmail@pb1.pair.com... > Dear Sirs, > > I am trying to post a xml file to following http. But I can not. where can I > find some source to read. > > https://xxx.xxx.xxx.xx/servlet/com.oks.buing.xml.detdrd > > Any help welcome > >

« previous php.general (#137965) next »