ADODB.Stream (please help me)

Post everything else here

Moderators: Website/Forum Admins, Other/Off Topic Moderators

haMid
Posts: 4
Joined: Fri Mar 03, 2006 7:23 am
Location: Iran
Contact:

ADODB.Stream (please help me)

Postby haMid » Fri Mar 03, 2006 7:31 am

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
eVeryhing is poSSible
Zyrkon
Posts: 20
Joined: Thu Aug 14, 2003 9:05 pm
Location: .de
Contact:

Postby Zyrkon » Fri Mar 03, 2006 8:15 am

As you are on an ircish forum, let me give you an ircish answer:

"Please ask in #php kthx".


-Zyrkon
User avatar
Pills
Forum Admin
Posts: 312
Joined: Wed Jul 02, 2003 1:14 pm
Location: Long Island, NY
Contact:

Postby Pills » Fri Mar 03, 2006 2:37 pm

Moved to off-topic.
admin, irc.umich.edu
oper, irc.servercentral.net
haMid
Posts: 4
Joined: Fri Mar 03, 2006 7:23 am
Location: Iran
Contact:

Postby haMid » Fri Mar 03, 2006 8:06 pm

so?
eVeryhing is poSSible
User avatar
munky
Site Admin
Posts: 826
Joined: Wed Jul 02, 2003 4:54 pm
Location: Phoenix AZ
Contact:

Postby munky » Sat Mar 04, 2006 1:15 pm

In God we trust,
Everyone else must have an X.509 certificate.
haMid
Posts: 4
Joined: Fri Mar 03, 2006 7:23 am
Location: Iran
Contact:

Postby haMid » Sat Mar 04, 2006 4:18 pm

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;
...
eVeryhing is poSSible
wundr
Posts: 140
Joined: Sun Jul 06, 2003 11:34 pm
Location: Japan

Postby wundr » Sat Mar 04, 2006 5:19 pm

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...
User avatar
munky
Site Admin
Posts: 826
Joined: Wed Jul 02, 2003 4:54 pm
Location: Phoenix AZ
Contact:

Postby munky » Mon Mar 06, 2006 11:23 am

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?
In God we trust,
Everyone else must have an X.509 certificate.
User avatar
Pills
Forum Admin
Posts: 312
Joined: Wed Jul 02, 2003 1:14 pm
Location: Long Island, NY
Contact:

Postby Pills » Mon Mar 06, 2006 2:28 pm

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. ;)
admin, irc.umich.edu
oper, irc.servercentral.net
haMid
Posts: 4
Joined: Fri Mar 03, 2006 7:23 am
Location: Iran
Contact:

Postby haMid » Mon Mar 06, 2006 4:15 pm

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
eVeryhing is poSSible
User avatar
Pills
Forum Admin
Posts: 312
Joined: Wed Jul 02, 2003 1:14 pm
Location: Long Island, NY
Contact:

Postby Pills » Mon Mar 06, 2006 4:41 pm

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.
admin, irc.umich.edu
oper, irc.servercentral.net

Who is online

Users browsing this forum: No registered users and 2 guests