php-windows Digest 12 Jun 2004 03:06:48 -0000 Issue 2281

Topics (messages 23958 through 23969):

Re: send XML thru POST
        23958 by: Svensson, B.A.T. (HKG)
        23959 by: Joakim Ling, Lokalguiden
        23960 by: Svensson, B.A.T. (HKG)
        23961 by: Joakim Ling, Lokalguiden
        23962 by: Svensson, B.A.T. (HKG)
        23963 by: Great Rhemax
        23964 by: Justin Patrin
        23967 by: Manuel Lemos

Tm and Gd Library
        23965 by: Alekc
        23966 by: Gerardo Rojas

Re: Where is mysqli in PHP5rc3?
        23968 by: Jason Barnett

PHP code breaks
        23969 by: Jonathan Gravois

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
And what is the error message you get then? 

-----Original Message-----
From: Joakim Ling, Lokalguiden
To: [EMAIL PROTECTED]
Sent: 11-6-2004 9:21
Subject: [PHP-WIN] send XML thru POST

Hi

Im tring to send XML thru POST to a server. I have a demo in asp that
works fine but how do I write this in php.

This is the ASP demo 
sXML = "<?xml version=""1.0"" encoding=""ISO-8859-1"" 
Set oHttpConn = CreateObject("MSXML2.ServerXMLHTTP")
Call oHttpConn.Open("POST", sURL, False)
Call oHttpConn.setRequestHeader("Content-Type", "Text/xml")
Call oHttpConn.send(sXML)
sXMLResponse = oHttpConn.responseText
Set oHttpConn = Nothing


I tried this from the php-manual but no result. Its like it cant find
the remote server.

$fp = fsockopen ($sUrl, 80, $errno, $errstr, 30);
$msg =  "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"";
if (!$fp) {
    print("$errstr ($errno)<br>\r\n");
} else {
 if ($fp) {
  fputs($fp, "POST /$sUrl HTTP/1.0\r\n");
  fputs($fp, "Content-Type: text/xml\r\n");
  fputs($fp, "Content-Length: ".strlen($msg)."\r\n");
  fputs($fp, "\r\n");
  fputs($fp, $msg);
  $content = 0;
  $reply = array();
  while (!feof($fp)) {
   echo fgets ($fp,128);
  }
  fclose($fp);
 }
}


Thanks for help..  // Jocke

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Warning: fsockopen(): php_network_getaddresses: gethostbyname failed in
c:\inetpub\wwwroot\tmp\telia.php on line 3

Warning: fsockopen(): unable to connect to <address>:80 in
c:\inetpub\wwwroot\tmp\telia.php on line 3
�tg�rden har slutf�rts. (0)

Its like it cant find the server, but the ASP connection works. Any
ideas?



"B.A.T. Svensson" <[EMAIL PROTECTED]> skrev i meddelandet
news:<[EMAIL PROTECTED]>...
> And what is the error message you get then?
> 
> -----Original Message-----
> From: Joakim Ling, Lokalguiden
> To: [EMAIL PROTECTED]
> Sent: 11-6-2004 9:21
> Subject: [PHP-WIN] send XML thru POST
> 
> Hi
> 
> Im tring to send XML thru POST to a server. I have a demo in asp that 
> works fine but how do I write this in php.
> 
> This is the ASP demo
> sXML = "<?xml version=""1.0"" encoding=""ISO-8859-1"" 
> Set oHttpConn = CreateObject("MSXML2.ServerXMLHTTP")
> Call oHttpConn.Open("POST", sURL, False)
> Call oHttpConn.setRequestHeader("Content-Type", "Text/xml")
> Call oHttpConn.send(sXML)
> sXMLResponse = oHttpConn.responseText
> Set oHttpConn = Nothing
> 
> 
> I tried this from the php-manual but no result. Its like it cant find 
> the remote server.
> 
> $fp = fsockopen ($sUrl, 80, $errno, $errstr, 30);
> $msg =  "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"";
> if (!$fp) {
>     print("$errstr ($errno)<br>\r\n");
> } else {
>  if ($fp) {
>   fputs($fp, "POST /$sUrl HTTP/1.0\r\n");
>   fputs($fp, "Content-Type: text/xml\r\n");
>   fputs($fp, "Content-Length: ".strlen($msg)."\r\n");
>   fputs($fp, "\r\n");
>   fputs($fp, $msg);
>   $content = 0;
>   $reply = array();
>   while (!feof($fp)) {
>    echo fgets ($fp,128);
>   }
>   fclose($fp);
>  }
> }
> 
> 
> Thanks for help..  // Jocke
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
You have probaly sumbited and URL instead of a host address then.
Or your host address is invalid - try the IP# of the host - this
may indicate a problem to do a DNS lookup.

-----Original Message-----
From: Joakim Ling, Lokalguiden
To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
Sent: 11-6-2004 9:52
Subject: Re: [PHP-WIN] send XML thru POST

Warning: fsockopen(): php_network_getaddresses: gethostbyname failed in
c:\inetpub\wwwroot\tmp\telia.php on line 3

Warning: fsockopen(): unable to connect to <address>:80 in
c:\inetpub\wwwroot\tmp\telia.php on line 3
�tg�rden har slutf�rts. (0)

Its like it cant find the server, but the ASP connection works. Any
ideas?



"B.A.T. Svensson" <[EMAIL PROTECTED]> skrev i meddelandet
news:<[EMAIL PROTECTED]>...
> And what is the error message you get then?
> 
> -----Original Message-----
> From: Joakim Ling, Lokalguiden
> To: [EMAIL PROTECTED]
> Sent: 11-6-2004 9:21
> Subject: [PHP-WIN] send XML thru POST
> 
> Hi
> 
> Im tring to send XML thru POST to a server. I have a demo in asp that 
> works fine but how do I write this in php.
> 
> This is the ASP demo
> sXML = "<?xml version=""1.0"" encoding=""ISO-8859-1"" 
> Set oHttpConn = CreateObject("MSXML2.ServerXMLHTTP")
> Call oHttpConn.Open("POST", sURL, False)
> Call oHttpConn.setRequestHeader("Content-Type", "Text/xml")
> Call oHttpConn.send(sXML)
> sXMLResponse = oHttpConn.responseText
> Set oHttpConn = Nothing
> 
> 
> I tried this from the php-manual but no result. Its like it cant find 
> the remote server.
> 
> $fp = fsockopen ($sUrl, 80, $errno, $errstr, 30);
> $msg =  "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"";
> if (!$fp) {
>     print("$errstr ($errno)<br>\r\n");
> } else {
>  if ($fp) {
>   fputs($fp, "POST /$sUrl HTTP/1.0\r\n");
>   fputs($fp, "Content-Type: text/xml\r\n");
>   fputs($fp, "Content-Length: ".strlen($msg)."\r\n");
>   fputs($fp, "\r\n");
>   fputs($fp, $msg);
>   $content = 0;
>   $reply = array();
>   while (!feof($fp)) {
>    echo fgets ($fp,128);
>   }
>   fclose($fp);
>  }
> }
> 
> 
> Thanks for help..  // Jocke
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hmm, ok. 

$fp = fsockopen ("http://kontaktamig.telia.se";, 80, $errno, $errstr,
30);
fputs($fp, "POST /servlet/teliawebforms.SendXMLISO HTTP/1.0\r\n");

Correct?


"B.A.T. Svensson" <[EMAIL PROTECTED]> skrev i meddelandet
news:<[EMAIL PROTECTED]>...
You have probaly sumbited and URL instead of a host address then. Or
your host address is invalid - try the IP# of the host - this may
indicate a problem to do a DNS lookup.

-----Original Message-----
From: Joakim Ling, Lokalguiden
To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
Sent: 11-6-2004 9:52
Subject: Re: [PHP-WIN] send XML thru POST

Warning: fsockopen(): php_network_getaddresses: gethostbyname failed in
c:\inetpub\wwwroot\tmp\telia.php on line 3

Warning: fsockopen(): unable to connect to <address>:80 in
c:\inetpub\wwwroot\tmp\telia.php on line 3 �tg�rden har slutf�rts. (0)

Its like it cant find the server, but the ASP connection works. Any
ideas?



"B.A.T. Svensson" <[EMAIL PROTECTED]> skrev i meddelandet
news:<[EMAIL PROTECTED]>...
> And what is the error message you get then?
> 
> -----Original Message-----
> From: Joakim Ling, Lokalguiden
> To: [EMAIL PROTECTED]
> Sent: 11-6-2004 9:21
> Subject: [PHP-WIN] send XML thru POST
> 
> Hi
> 
> Im tring to send XML thru POST to a server. I have a demo in asp that
> works fine but how do I write this in php.
> 
> This is the ASP demo
> sXML = "<?xml version=""1.0"" encoding=""ISO-8859-1""
> Set oHttpConn = CreateObject("MSXML2.ServerXMLHTTP")
> Call oHttpConn.Open("POST", sURL, False)
> Call oHttpConn.setRequestHeader("Content-Type", "Text/xml")
> Call oHttpConn.send(sXML)
> sXMLResponse = oHttpConn.responseText
> Set oHttpConn = Nothing
> 
> 
> I tried this from the php-manual but no result. Its like it cant find
> the remote server.
> 
> $fp = fsockopen ($sUrl, 80, $errno, $errstr, 30);
> $msg =  "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"";
> if (!$fp) {
>     print("$errstr ($errno)<br>\r\n");
> } else {
>  if ($fp) {
>   fputs($fp, "POST /$sUrl HTTP/1.0\r\n");
>   fputs($fp, "Content-Type: text/xml\r\n");
>   fputs($fp, "Content-Length: ".strlen($msg)."\r\n");
>   fputs($fp, "\r\n");
>   fputs($fp, $msg);
>   $content = 0;
>   $reply = array();
>   while (!feof($fp)) {
>    echo fgets ($fp,128);
>   }
>   fclose($fp);
>  }
> }
> 
> 
> Thanks for help..  // Jocke
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
----------

--- End Message ---
--- Begin Message ---
Remove http://

On Fri, 2004-06-11 at 10:27, Joakim Ling, Lokalguiden wrote:
> Hmm, ok. 
> 
> $fp = fsockopen ("http://kontaktamig.telia.se";, 80, $errno, $errstr,
> 30);
> fputs($fp, "POST /servlet/teliawebforms.SendXMLISO HTTP/1.0\r\n");
> 
> Correct?
> 
> 
> "B.A.T. Svensson" <[EMAIL PROTECTED]> skrev i meddelandet
> news:<[EMAIL PROTECTED]>...
> You have probaly sumbited and URL instead of a host address then. Or
> your host address is invalid - try the IP# of the host - this may
> indicate a problem to do a DNS lookup.
> 
> -----Original Message-----
> From: Joakim Ling, Lokalguiden
> To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
> Sent: 11-6-2004 9:52
> Subject: Re: [PHP-WIN] send XML thru POST
> 
> Warning: fsockopen(): php_network_getaddresses: gethostbyname failed in
> c:\inetpub\wwwroot\tmp\telia.php on line 3
> 
> Warning: fsockopen(): unable to connect to <address>:80 in
> c:\inetpub\wwwroot\tmp\telia.php on line 3 ÃtgÃrden har slutfÃrts. (0)
> 
> Its like it cant find the server, but the ASP connection works. Any
> ideas?
> 
> 
> 
> "B.A.T. Svensson" <[EMAIL PROTECTED]> skrev i meddelandet
> news:<[EMAIL PROTECTED]>...
> > And what is the error message you get then?
> > 
> > -----Original Message-----
> > From: Joakim Ling, Lokalguiden
> > To: [EMAIL PROTECTED]
> > Sent: 11-6-2004 9:21
> > Subject: [PHP-WIN] send XML thru POST
> > 
> > Hi
> > 
> > Im tring to send XML thru POST to a server. I have a demo in asp that
> > works fine but how do I write this in php.
> > 
> > This is the ASP demo
> > sXML = "<?xml version=""1.0"" encoding=""ISO-8859-1""
> > Set oHttpConn = CreateObject("MSXML2.ServerXMLHTTP")
> > Call oHttpConn.Open("POST", sURL, False)
> > Call oHttpConn.setRequestHeader("Content-Type", "Text/xml")
> > Call oHttpConn.send(sXML)
> > sXMLResponse = oHttpConn.responseText
> > Set oHttpConn = Nothing
> > 
> > 
> > I tried this from the php-manual but no result. Its like it cant find
> > the remote server.
> > 
> > $fp = fsockopen ($sUrl, 80, $errno, $errstr, 30);
> > $msg =  "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"";
> > if (!$fp) {
> >     print("$errstr ($errno)<br>\r\n");
> > } else {
> >  if ($fp) {
> >   fputs($fp, "POST /$sUrl HTTP/1.0\r\n");
> >   fputs($fp, "Content-Type: text/xml\r\n");
> >   fputs($fp, "Content-Length: ".strlen($msg)."\r\n");
> >   fputs($fp, "\r\n");
> >   fputs($fp, $msg);
> >   $content = 0;
> >   $reply = array();
> >   while (!feof($fp)) {
> >    echo fgets ($fp,128);
> >   }
> >   fclose($fp);
> >  }
> > }
> > 
> > 
> > Thanks for help..  // Jocke
> > 
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> ----------
> 

--- End Message ---
--- Begin Message ---
Say you want to send the XML data to: http://myserver.com/listener.php
The you should use:

$fp = fsockopen (myserver.com, 80, $errno, $errstr, 30);

and later down

fputs($fp, "POST /listener.php HTTP/1.0\r\n");




"Joakim Ling" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi
>
> Im tring to send XML thru POST to a server. I have a demo in asp that
> works fine but how do I write this in php.
>
> This is the ASP demo
> sXML = "<?xml version=""1.0"" encoding=""ISO-8859-1""
> Set oHttpConn = CreateObject("MSXML2.ServerXMLHTTP")
> Call oHttpConn.Open("POST", sURL, False)
> Call oHttpConn.setRequestHeader("Content-Type", "Text/xml")
> Call oHttpConn.send(sXML)
> sXMLResponse = oHttpConn.responseText
> Set oHttpConn = Nothing
>
>
> I tried this from the php-manual but no result. Its like it cant find
> the remote server.
>
> $fp = fsockopen ($sUrl, 80, $errno, $errstr, 30);
> $msg =  "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"";
> if (!$fp) {
>     print("$errstr ($errno)<br>\r\n");
> } else {
>  if ($fp) {
>   fputs($fp, "POST /$sUrl HTTP/1.0\r\n");
>   fputs($fp, "Content-Type: text/xml\r\n");
>   fputs($fp, "Content-Length: ".strlen($msg)."\r\n");
>   fputs($fp, "\r\n");
>   fputs($fp, $msg);
>   $content = 0;
>   $reply = array();
>   while (!feof($fp)) {
>    echo fgets ($fp,128);
>   }
>   fclose($fp);
>  }
> }
>
>
> Thanks for help..  // Jocke

--- End Message ---
--- Begin Message ---
Joakim Ling wrote:

Hi

Im tring to send XML thru POST to a server. I have a demo in asp that
works fine but how do I write this in php.

This is the ASP demo sXML = "<?xml version=""1.0"" encoding=""ISO-8859-1"" Set oHttpConn = CreateObject("MSXML2.ServerXMLHTTP")
Call oHttpConn.Open("POST", sURL, False)
Call oHttpConn.setRequestHeader("Content-Type", "Text/xml")
Call oHttpConn.send(sXML)
sXMLResponse = oHttpConn.responseText
Set oHttpConn = Nothing



I tried this from the php-manual but no result. Its like it cant find the remote server.

$fp = fsockopen ($sUrl, 80, $errno, $errstr, 30);
$msg =  "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"";
if (!$fp) {
    print("$errstr ($errno)<br>\r\n");
} else {
 if ($fp) {
  fputs($fp, "POST /$sUrl HTTP/1.0\r\n");
  fputs($fp, "Content-Type: text/xml\r\n");
  fputs($fp, "Content-Length: ".strlen($msg)."\r\n");
  fputs($fp, "\r\n");
  fputs($fp, $msg);
  $content = 0;
  $reply = array();
  while (!feof($fp)) {
   echo fgets ($fp,128);
  }
  fclose($fp);
 }
}


Thanks for help.. // Jocke

Well, the easieest way to do this is use a pre-existing set of code which does this for you (like you did in ASP). Try HTTP_Request from PEAR.


http://pear.php.net/package/HTTP_Request

--
paperCrane <Justin Patrin>

--- End Message ---
--- Begin Message ---
Hello,

On 06/11/2004 04:21 AM, Joakim Ling wrote:
Im tring to send XML thru POST to a server. I have a demo in asp that
works fine but how do I write this in php.

You may want to try this HTTP client class that comes with an example to do exactly what you want, POST a XML file (see the SOAP request). If necessary it supports proxies, SSL (HTTPS) and authentication:


http://www.phpclasses.org/httpclient


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--- End Message ---
--- Begin Message ---
Is it possible print on the image an symbol tm???

by using imagettftext, it's print special chars like copyright, etc, but it doesn't work with tm...

I have tryed to use fonts like verdana, arial, etc but nothing

Some suggetsion?

--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

--- End Message ---
--- Begin Message ---
Alekc

Maybe this will help if you outputting plain text:

chr(153) will output =    ' T ' 


--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]


-----Original Message-----
From: Alekc [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 10:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Tm and Gd Library


Is it possible print on the image an symbol tm???

by using imagettftext, it's print special chars like copyright, etc, but  
it doesn't work with tm...

I have tryed to use fonts like verdana, arial, etc but nothing

Some suggetsion?

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message --- [EMAIL PROTECTED] wrote:
The mysqli DLL file is not present in the PHP5rc3 for Win32 package, nor is it bundled. Can't find it in the PECL package either. Did they just forget to put the DLL in the package or is there a more esoteric explanation to this?

Erik

The new releases of MySQL are licensed under the GPL. I read over on Zend's site that MySQL is trying to make an exception for PHP and a few other open source projects, but a lot of the people at Zend don't want to restrict their PHP users. And, a few others thought that they shouldn't show preferences to any database.


I was also unpleasantly surprised by this, but since I don't have a pressing time concern this was no deal for me. Instead, I've learned how to migrate my databases to another system :)
--- End Message ---
--- Begin Message ---
       I get this error: Parse error: parse error, unexpected ':' in
       c:\inetpub\wwwroot\mchsvb\EmailPassword.php on line 100
                    Here's line 100:
                        $from = "From: [EMAIL PROTECTED]
<[EMAIL PROTECTED]>\r\n";
                     Anyone see anything wrong? I'm going nuts.
                     Jon

--- End Message ---

Reply via email to