Schrift
[thread]8691[/thread]

Adding html to php



<< >> 2 Einträge, 1 Seite
Gast Gast
 2007-01-28 22:17
#73739 #73739
Hi.
I'm low at German, sorry.
I have a php script 'index.php'
which returns this html code:
Code: (dl )
<b>Thank you</b>

and sent it to the browser.

How do I capture it's code, add mine and return it to the browser as if it's the php's one.

Example:
User requested index.php
Quote
print("<b>This is by php</b>");


in some way perl script had been started
and then added this string to the output:
<b>This from perl</b>

And the user receives one page, named index.php
which contains
Code: (dl )
<b>This is by php</b><b>This from Perl</b>


Any manual at English or English Perl forum, or simple example.
Thank you ahead, Sasha.
jan
 2007-01-28 22:41
#73740 #73740
User since
2003-08-04
2536 Artikel
ModeratorIn
[Homepage] [default_avatar]
you could use the php-cli (command line interface) to run the php-script and save its output. since this is not available on every server, I'd suggest using CPAN:LWP::Simple

Code: (dl )
1
2
3
4
5
use LWP::Simple;
if(my $phpContent = get('http://www.mydomain.tld/index.php'))
{
print "php said: " . $phpContent . "<br />";
}
<< >> 2 Einträge, 1 Seite



View all threads created 2007-01-28 22:17.