<?php

// Paypal Variables
$cmd = "_xclick";
$business = "mkeefe@mkeefedesign.com";

$item_name = "Cool Widget";
$item_number = "123456";
$amount = "12.95";

$no_shipping = "0";
$no_not = "1";
$currency_code = "USD";
$weight = "1";
$weight_unit = "lbs";
$lc = "US";
$bn = "PP-BuyNowBF";

$server = "https://www.paypal.com/cgi-bin/webscr";

$content = 'name1=value1&name2=value2';

// if allowed, make call

$params = array('http' => array(
	'method' => 'post',
	'content' => $content
));

if ($optional_headers!== null) 
{
	$params['http']['header'] = $optional_headers;
}

$ctx = stream_context_create($params);
$fp = @fopen($url, 'rb', false, $ctx);
if(!$fp) 
{
	throw new Exception("Problem with $url, $php_errormsg");
}

$response = @stream_get_contents($fp);
if($response === false) 
{
	throw new Exception("Problem reading data from $url, $php_errormsg");
}

?>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="mkeefe@mkeefedesign.com">
<input type="hidden" name="item_name" value="Cool Widget">
<input type="hidden" name="item_number" value="123456">
<input type="hidden" name="amount" value="12.95">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="weight" value="1">
<input type="hidden" name="weight_unit" value="lbs">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>