Re: [PHP] php output to string

2005-08-16 Thread Jesús Fernández
thanks everyone, the problem was the url i needed to use. now the problem is solved :) -- El único error real es aquel en el que no hemos aprendido nada.

Re: [PHP] php output to string

2005-08-10 Thread Matthew Weier O'Phinney
* Jesús Fernández [EMAIL PROTECTED]: thanks, it works, but that returns the php code. what i actually need is the output of that php code evaluated. So eval() the string... -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List

Re: [PHP] php output to string

2005-08-10 Thread Richard Lynch
On Tue, August 9, 2005 2:55 pm, Jesús Fernández wrote: Hi there, i'm a little newbie you know. I have a php that returns some xml, and i want to parse that xml through php. the xml returned depends on the variable passed thru the url. what i need is to get the output of that php file and

[PHP] php output to string

2005-08-09 Thread Jesús Fernández
Hi there, i'm a little newbie you know. I have a php that returns some xml, and i want to parse that xml through php. the xml returned depends on the variable passed thru the url. what i need is to get the output of that php file and store it in a string. i have tried everything i have though,

Re: [PHP] php output to string

2005-08-09 Thread Cafer Simsek
Hi, You may make it with fopen() like that; $fd = fopen($url, r); $returnString = while (!feof($fd)) { $returnString .= fgets($fd); } fclose($fd); Jesús Fernández [EMAIL PROTECTED] writes: Hi there, i'm a little newbie you know. I have a php that returns some xml, and i want to

Re: [PHP] php output to string

2005-08-09 Thread Jesús Fernández
thanks, it works, but that returns the php code. what i actually need is the output of that php code evaluated. -- El único error real es aquel en el que no hemos aprendido nada.

Re: [PHP] php output to string

2005-08-09 Thread Cafer Şimşek
Ok, Has the remote machine configured to run the php? So, the remote machine is your $url variable's host. Or, you may try browse the URL via any browser (etc; IE, Firefox). If you see the PHP codes, the remote machine has not been configured to run PHP. Jesús Fernández [EMAIL PROTECTED]

Re: [PHP] php output to string

2005-08-09 Thread Jesús Fernández
yes, the remote machine runs php (its my hosting's server) -- El único error real es aquel en el que no hemos aprendido nada.

Re: [PHP] php output to string

2005-08-09 Thread Cafer Şimşek
Your $url variable's content like what? So, if you using like ftp://foo.bar it's the generally normal that you see the codes. If not, would you like to give me the $url's content? (Sorry for my bad English) Jesús Fernández [EMAIL PROTECTED] writes: yes, the remote machine runs php (its

Re: [PHP] php output to string

2005-08-09 Thread Jesús Fernández
well, i found a little problem with this. when $url looks like http://myhosting/xml.php; and i upload it to my hosting, it times out before getting the content. that php needs includes and when i try $url=/dir/xml.php it gives me a not found error. the file it doesnt find is one of those