[PHP] Re: Strange need - "Repeater" appliation

2002-04-21 Thread jyrgen

On 20 Apr 02, at 11:48, Peter Janett wrote:

> I need to create a simple app that works like a radio repeater, in that is
> simply passes information it receives through to another script, in both
> directions.
> 
> In other words, a remote application located at www.domain.com/app.php
> accepts variable1, variable2, and variable3, and returns a response based on
> that information.
> 
> I want to put a "repeater app" in the middle of the browser and the url
> above, so information is passed to www.mydomain.com/process.php, and is not
> changed at all, but is sent to www.domain.com/app.php, and the response from
> www.domain.com/app.php is sent back to www.mydomain.com/process.php, so the
> results of sending the same information to either url will be exactly the
> same.
> 
> I'm not trying to do packet sniffing or anything, just trying to "mask" a
> url.  It would be nice if I could pass cookies through as well.
> 
> Any help, resources, ideas, etc appreciated.

i have the following idea if you want to use standard HTML-PHP 
techniques:

if the amount of information is not too large, make use of URL-
attached variables and pass them to your repeater script, which
contains a form. Dont forget to attach also ...&submit=yes to it.
parse recieved variables in that script with and parsestr($argv[0])

juergen




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




[PHP] getting pages with FILE

2002-05-03 Thread jyrgen

hello all,
i'm using FILE to read a page via HTTP and construct an array of 
HTML lines. After that i modify the page and echo it out.
this all works great. The web server delivers pages depending on
browser types. Now i need to "pretend" a certain browser. Can this
be done ? What kind of HTTP-request does FILE send to the 
webserver ?
juergen



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




Re: [PHP] getting pages with FILE

2002-05-04 Thread jyrgen

On 3 May 02, at 12:16, Miguel Cruz wrote:

> On Fri, 3 May 2002 [EMAIL PROTECTED] wrote:
> > i'm using FILE to read a page via HTTP and construct an array of 
> > HTML lines. After that i modify the page and echo it out.
> > this all works great. The web server delivers pages depending on
> > browser types. Now i need to "pretend" a certain browser. Can this
> > be done ? What kind of HTTP-request does FILE send to the 
> > webserver ?
> 
> It identifies itself along these lines:
> 
>HTTP-User-Agent: PHP/4.1.2

thank you. now is there a way to modify the above identification, 
say something like "HTTP-User-Agent: Netscape 4 (Mozilla etc..."


> If that's not going to work out, you may need to use something like cURL.

never heard of cURL ? is it a extension for PHP ?

jyrgen


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




[PHP] variables attached to url

2002-05-11 Thread jyrgen

a few weeks ago there was a discussion about how 
to get
variables attached to a url like
http://server.com/script.php?var1=value1&var2=val
ue2&var3=value3

the easiest way to do this is possibly:

$vars  = explode("&", $argv[0]);
parse_str($vars);


with these two lines you will have the variables
defined in your script and can refer to them by
$var1, $var2 etc.

jyrgen

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