O.K.  I found this at php.net but it doesn't seem to bring up the paypal
page.  I guess I am trying to simulate a form POST using headers.  Any
ideas???

$paypal_vars is an array of the vars and values that paypal needs.

foreach($paypal_vars as $key => $value) {
    $value = urlencode(stripslashes($value));
    $req .= "&$key=$value";
}
$req = substr($req, 1, strlen($req) - 1);

$header .= "POST www.paypal.com HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= 'Content-Length: ' . strlen($req) . "\r\n\r\n";
$fp = fsockopen (/xclick/, 80, $errno, $errstr, 30);

if(!$fp) {
    echo "$errstr ($errno)";
} else {
    fputs($fp, $header . $req);
    while(!feof($fp)) {
        $res = fgets ($fp, 1024);
    }
    fclose ($fp);
}

Thanks!
Shawn

"Chris Shiflett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> --- Shawn McKenzie <[EMAIL PROTECTED]> wrote:
> > I want to pass vars to another site but I don't want
> > to use a form. How can I pass these vars to another
> > site without the vars being shown in the URL.
>
> That question is far too vague in terms of who needs to be
> passing data where. If you want to pass data to a Web
> server, and you do not want to use URL variables, then your
> only options are POST and cookies.
>
> If you are speaking about a user of your Web site who needs
> to be sending data to a Web server, and you do not want
> them to use URL variables or submit an HTML form, then
> cookies are your only option.
>
> Perhaps you can elaborate on what you are trying to
> accomplish?
>
> Chris



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

Reply via email to