You are here: Re: How to print(other php page's output)? « PHP Programming Language « IT news, forums, messages
Re: How to print(other php page's output)?

Posted by Kim Andrι Akerψ on 10/24/05 18:26

typingcat@gmail.com wrote:

> My application checks for updates by accessing a php page on my
> website. Like the following;
> http://myserver.com/oldchecker/check.php?version=1.0
>
> Now I have created a new checking page like the following;
> http://myserver.com/newchecker/check.php?ver=1.0&name=user
>
> Because there still are users who are using old versions, I need to
> keep the old checker but I would like to use the new checker's result
> in the old checker. I mean, I want to do something like
>
> if ...oldchecker/checker.php?version=1.0 is requested,
> ------------
> WebRequest req=WebRequest.Create("..../newchecker/checker.php?" +
> "ver=" + Request["version"] +
> "&name=UNKNOWN");
> WebResponse=req.GetResponse();
> StreamReader sr = new StreamReader(Response.GetResponseStream());
> String Output=sr.ReadToEnd();
> Response.Write(Output);
> --------
>
> I'm more familiar with C# so I wrote it in C#, but I guess you have
> figured out what I'm trying to do.

oldchecker/check.php:

<?php

$scripturl = "http://example.com/newchecker/check.php";

header("Location:
".$scripturl."?ver=".$_GET["version"]."&name=UNKNOWN");

?>


--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация