<form name="prints1" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="prints1">
<input type="hidden" name="ppr" value="<?php echo $products_price; ?>" />
<input type="hidden" name="cust_id" value="<?php echo $_REQUEST['cust_id']; ?>" id="cust_id" />
<input type="hidden" name="business" value="<?php echo $_REQUEST['business']; ?>" >
<input type="hidden" name="admin_email" value="<?php echo $_REQUEST['admin_email']; ?>" >
<input type="hidden" name="item_name" value="Print_Services" >
<input type="hidden" name="first_name" value="<?php echo $fname; ?>" />
<input type="hidden" name="return" value="<?php echo $path."/index.php" ?>" />
<input type="hidden" name="amount" value="<?php echo $_REQUEST['amount']; ?>" />
<input type="hidden" name="payment" value="paypal_standard" >
<input type="hidden" name="undefined_quantity" value="0" />
<input type="hidden" name="cancel_return" value="<?php echo $_REQUEST['amount']; ?>" />
<input type="hidden" name="charset" value="utf-8" />
<input type="hidden" value="EUR" name="currency_code">
<div style="display:none"> <input type="submit" value="_xclick" name="cmd">
Search This Blog
Tuesday, October 5, 2010
Friday, October 1, 2010
Conver URL to Links
<?PHP
/* makehref(string string,string more);
the more will put what you want i think in a bug but i solve it.. the space in the end that i put.. if you want can create a better regular expression. i dont want to use my mind now.
*/ function makehref($s,$more) {
return preg_replace("/ $/","",preg_replace("/(http://[ws/.-_]*?)([ <n])/",'\1\2',$s . ' '));
}
makehref("this is only a http://www.teste.com and thisnis another http://true.test.com, but this is a test in http://same.line.com hehe");
?>
Convert Bytes to corresponding size
<?php
function ByteSize($bytes)
{
$size = $bytes / 1024;
if($size < 1024)
{
$size = number_format($size, 2);
$size .= ' KB';
}
else
{
if($size / 1024 < 1024)
{
$size = number_format($size / 1024, 2);
$size .= ' MB';
}
else if ($size / 1024 / 1024 < 1024)
{
$size = number_format($size / 1024 / 1024, 2);
$size .= ' GB';
}
}
return $size;
}
// Returns '19.28mb' print ByteSize('20211982');
?>
Subscribe to:
Posts (Atom)