CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
adding html to php scripts result

 



valenok
New User

Jan 28, 2007, 12:21 PM

Post #1 of 7 (835 views)
adding html to php scripts result Can't Post

Hi.

I have a php script 'index.php'
which returns this html code:

<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

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

<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.


KevinR
Veteran


Jan 28, 2007, 2:49 PM

Post #2 of 7 (833 views)
Re: [valenok] adding html to php scripts result [In reply to] Can't Post

I think you need to ask this question on a PHP forum. But maybe I just do not understand the question.
-------------------------------------------------


valenok
New User

Jan 28, 2007, 8:31 PM

Post #3 of 7 (832 views)
Re: [KevinR] adding html to php scripts result [In reply to] Can't Post

how to capture the result of php script with perl, add to it
some html and then send to the browser as the php's result.

Maybe I just have invented a new solution to the problem
but what I need is to add a banner to all requested pages from my server without editing the originally uploaded php code.

As has been done on the free hosting siteburg.com.

Thank you.


(This post was edited by valenok on Jan 28, 2007, 8:32 PM)


KevinR
Veteran


Jan 28, 2007, 8:37 PM

Post #4 of 7 (830 views)
Re: [valenok] adding html to php scripts result [In reply to] Can't Post

Getting the output of the PHP script shouldn't be hard, adding a banner(?) should also not be too hard, but returning it as index.php without actually editing the index.php file is something I don't know how to do.
-------------------------------------------------


valenok
New User

Jan 29, 2007, 9:19 AM

Post #5 of 7 (828 views)
Re: [KevinR] adding html to php scripts result [In reply to] Can't Post

You can see on a the free hosting siteburg.com
that when you upload a script ( I have done it )
and request it with the browser
you get the scripts result and you can see a banner added.
If you download the script back with FTP you see no changes.

Maybe it's a special mod for apache which adds some content to the output?


KevinR
Veteran


Jan 29, 2007, 9:33 AM

Post #6 of 7 (827 views)
Re: [valenok] adding html to php scripts result [In reply to] Can't Post

yea, that is common on free websites. Probably is done by the server, not perl. Maybe dave will know, I don't get into that stuff too often and only know some of the basics of htaccess and related stuff. Might be better to ask on a forum that deals with server setup issues.
-------------------------------------------------


valenok
New User

Jan 29, 2007, 9:35 AM

Post #7 of 7 (826 views)
Re: [KevinR] adding html to php scripts result [In reply to] Can't Post

Thank you a lot.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives