You are here: Re: [PHP] gather reply from POST « PHP « IT news, forums, messages
Re: [PHP] gather reply from POST

Posted by Jeremy Reynolds on 10/03/51 11:16

On Wed, May 18, 2005 11:55 am, Jeremy Reynolds said:
> I received this useful bit of code for storing a page into a variable
> instead of loading it as an include. But how can I modify this to
> submit some parameters to a page and collect the returned page / HTML
> into a variable??
>
> Jeremy
> --------------
> <?php
> /** DocumentB.php */
>
> $text = file_get_contents('DocumentA.php');
> echo $text;
>
> ?>

Try:
<?php
$foo = 1;
$bar = 2;
$text = file_get_contents("DocumentA.php?foo=$foo&bar=$bar");
echo $text;
?>

If that doesn't work, go to http://php.net/curl

--
Like Music?
http://l-i-e.com/artists.htm

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--

 

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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация