Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a TCL equivalent for php's readfile function?

Tags:

php

xml

tcl

The Situation:
Imagine two servers A and B. Server B just outputs a PDF file that nicely displays information retrieved from any xml string passed to it via a url parameter. Server A's job is to build an xml string, append this xml string onto a url (pointing to the code on Server B) as a parameter, and then call the url using php's readfile() function...

The Question:
Is there a way to do the same thing (readfile on remote server and output to browser) in TCL?

like image 275
m0rtimer Avatar asked Dec 09 '25 14:12

m0rtimer


1 Answers

The TCL readfile equivalent is file http://www.tcl.tk/man/tcl8.6/TclCmd/file.htm

However, it appears that the PHP readfile function has an option to read a file from a URL if the fopen wrappers have been enabled http://php.net/manual/en/function.readfile.php

So in this case you need to use a HTTP client. Try this http://www.tcl.tk/man/tcl8.6/TclCmd/http.htm and there is an example of how to use it here http://wiki.tcl.tk/24061

like image 79
TrojanName Avatar answered Dec 12 '25 06:12

TrojanName



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!