Page 1 of 1

ADODB.Stream (please help me)

Posted: Fri Mar 03, 2006 7:31 am
by haMid
Hi all,
i have a client side page that create xml of a binary file and POST this xml by adodb.stream, so i want recieve file from my site with php.
it means that:
1.how read this POST file in my site?
(i think that first i should creat an adodb.stream object)

2.how create a file with this xml

BTW i have asp code for it:

Code: Select all

<%@ LANGUAGE=VBScript%>
<% Option Explicit
   Response.Expires = 0 
   
   ' define variables and COM objects
   dim ado_stream
   dim xml_dom
   dim xml_file1

   ' create Stream Object
   set ado_stream = Server.CreateObject("ADODB.Stream")
   ' create XMLDOM object and load it from request ASP object
   set xml_dom = Server.CreateObject("MSXML2.DOMDocument")
   xml_dom.load(request)
   ' retrieve XML node with binary content
   set xml_file1 = xml_dom.selectSingleNode("root/file1")

   ' open stream object and store XML node content into it   
   ado_stream.Type = 1  ' 1=adTypeBinary 
   ado_stream.open 
   ado_stream.Write xml_file1.nodeTypedValue
   ' save uploaded file
   ado_stream.SaveToFile "c:\tmp\upload1.doc",2  ' 2=adSaveCreateOverWrite 
   ado_stream.close

   ' destroy COM object   
   set ado_stream = Nothing 
   set xml_dom = Nothing
   ' write message to browser
   Response.Write "Upload successful!"
%>
Thank you

Posted: Fri Mar 03, 2006 8:15 am
by Zyrkon
As you are on an ircish forum, let me give you an ircish answer:

"Please ask in #php kthx".


-Zyrkon

Posted: Fri Mar 03, 2006 2:37 pm
by Pills
Moved to off-topic.

Posted: Fri Mar 03, 2006 8:06 pm
by haMid
so?

Posted: Sat Mar 04, 2006 1:15 pm
by munky

Posted: Sat Mar 04, 2006 4:18 pm
by haMid
look
first i could connect to adodb COM for read buffer and then create xml file

i need connect to adodb.stream and read data that POST to me

Code: Select all

$ado_obj = new COM("ADODB.Stream") or die("ado cannot!");
$ado_obj->Type=1;
$ado_obj->open;
...

Posted: Sat Mar 04, 2006 5:19 pm
by wundr
haMid wrote:look
first i could connect to adodb COM for read buffer and then create xml file

i need connect to adodb.stream and read data that POST to me

Code: Select all

$ado_obj = new COM("ADODB.Stream") or die("ado cannot!");
$ado_obj->Type=1;
$ado_obj->open;
...
Hi,

I don't know how you found this forum, but this is NOT a PHP help forum. This is a forum for EFNet IRC (Internet Relay Chat). You may have more luck going to a PHP-related help forum to ask your questions.

I think that is what the previous people were trying to say...

Posted: Mon Mar 06, 2006 11:23 am
by munky
wundr wrote:I don't know how you found this forum, but this is NOT a PHP help forum. This is a forum for EFNet IRC (Internet Relay Chat). You may have more luck going to a PHP-related help forum to ask your questions.

I think that is what the previous people were trying to say...
technically, this is the off topic forum on efnet.org. i think the only thing you can't post in an off topic forum is something that's on topic....

that being said, i don't think hamid is describing the situation very well. first he's parsing xml data in php, now he's reading HTTP POST response into an ADODB.Stream?

Posted: Mon Mar 06, 2006 2:28 pm
by Pills
munky wrote:
wundr wrote:I don't know how you found this forum, but this is NOT a PHP help forum. This is a forum for EFNet IRC (Internet Relay Chat). You may have more luck going to a PHP-related help forum to ask your questions.

I think that is what the previous people were trying to say...
technically, this is the off topic forum on efnet.org. i think the only thing you can't post in an off topic forum is something that's on topic....

that being said, i don't think hamid is describing the situation very well. first he's parsing xml data in php, now he's reading HTTP POST response into an ADODB.Stream?
It's only in off topic because I moved it to off topic. ;)

Posted: Mon Mar 06, 2006 4:15 pm
by haMid
just for munky:
look i use adodb.stream for read file from client and save it to xml files, then i send it by adodb.stream to a php page (server side), now i want read this information that post by adodb.stream and copy new file in server.

BTW i find that everybody here play with IRC and cant help me in php scripting!
enjoy

Posted: Mon Mar 06, 2006 4:41 pm
by Pills
haMid wrote:just for munky:
look i use adodb.stream for read file from client and save it to xml files, then i send it by adodb.stream to a php page (server side), now i want read this information that post by adodb.stream and copy new file in server.

BTW i find that everybody here play with IRC and cant help me in php scripting!
enjoy
Why would ANYONE here automatically know php scripting? Would you expect that anyone that uses AIM can troubleshoot a windows box?

Think this is wundr's point, too.