473,323 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Capturing PHP output

Hi, i posted a couple of days ago asking what the best way to capture
the output of a php array was (this would then be sent as a html
email) and was advised to use the functions ob_start and ob_get_clean,
unfortunatlly the server that i'm using only supports php 4.1.2 which
doens't support these functions.

Can anyone else reccommend a quick easy way to literally grab the html
on a page and save it as a variable so that it can be saved/emailed,
any help would be greatly appreciated.

Regards,

Ian
Jul 17 '05 #1
4 1332
Carved in mystic runes upon the very living rock, the last words of Ian N
of comp.lang.php make plain:
Hi, i posted a couple of days ago asking what the best way to capture
the output of a php array was (this would then be sent as a html
email) and was advised to use the functions ob_start and ob_get_clean,
unfortunatlly the server that i'm using only supports php 4.1.2 which
doens't support these functions.


http://www.php.net/manual/en/function.ob-start.php
ob_start
(PHP 4 , PHP 5)

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Jul 17 '05 #2
Hi,

Thanks for the response, i've had a look at that and wanted to use the
ob_get_clean funtion to return the data, unfortunatly this is the
function that's not supported. i'll try playing around with some of the
other ones, and post back.

Thanks

Jul 17 '05 #3
$str = ob_get_contents();
ob_end_clean();

would be equivalent to using

$str = ob_end_clean();

Best Regards,

Peter

"Ian N" <ia*******@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Hi,

Thanks for the response, i've had a look at that and wanted to use the
ob_get_clean funtion to return the data, unfortunatly this is the
function that's not supported. i'll try playing around with some of the
other ones, and post back.

Thanks

Jul 17 '05 #4
Correction:

$str = ob_get_contents();
ob_end_clean();

would be equivalent to using

$str = ob_get_clean();

// Peter
"Peter Albertsson" <Pe***********************@antispOm.comhem.se> wrote in
message news:5i*******************@newsb.telia.net...
$str = ob_get_contents();
ob_end_clean();

would be equivalent to using

$str = ob_end_clean();

Best Regards,

Peter

"Ian N" <ia*******@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Hi,

Thanks for the response, i've had a look at that and wanted to use the
ob_get_clean funtion to return the data, unfortunatly this is the
function that's not supported. i'll try playing around with some of the
other ones, and post back.

Thanks


Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jerrygarciuh | last post by:
Hello, I have a client who has decided to output the OO PHP/mySQL site I have made for them onto a cd. I realize that $html = include('somefile.php'); gets 1 for success as its return value....
4
by: Mark Wilson CPU | last post by:
This must be easy, but I'm missing something... I want to execute a Perl script, and capture ALL its output into a PHP variable. Here are my 2 files: -------------------------------------...
5
by: Moosebumps | last post by:
I have a large set of Python scripts that interface with command line utilities (primarily Perforce). I am currently capturing ALL the text output in order to get results and such. I am using the...
1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
4
by: PJ | last post by:
I would like to capture a request stream before the request has been completely sent to the server for the sake of saving the bytes of a posted file to disk. I have written httpmodules before, but...
4
by: Steve Wolfie | last post by:
Hello all: Again, let me thank everyone who has helped in the past. Can't wait till I can help out with some advice of my own. Now, I am building an app that wishes to retrieve the output of...
5
by: Luigi | last post by:
Hi to all! I'd like to execute an external program capturing the stdout/stderr messages at "real-time". I mean that I don't want to wait for the end of the process. If I write a code like this:...
6
by: Ed Leafe | last post by:
I've been approached by a local business that has been advised that they need to start capturing and archiving their instant messaging in order to comply with Sarbanes-Oxley. The company is largely...
0
by: Buglish | last post by:
Hi, Task : -Capture a HTML table with use of regular expression from a text string buffer(entire document). –Pass it to another function to create a multi dimension array out of it. - Pass it...
2
by: jallam | last post by:
Hi, I have a Python script to upload the Invoice data which is in .csv file to OTM (GLOG) system. I'm running this script using the command(given below) using a shell script and capturing the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.