just a reminder i'm not reasonsible for anything it does, although it looks fine, its money, your dealing with..remember to enable in your account to use your ip all use any ip/host
CODE
<?php
if($_POST['list'])
{
$people=trim(explode("\n",stripslashes($_POST['list'])));
foreach($people as $spender)
{
list($buyer,$referrer,$amount) = explode(',',$spender);
$fp=fopen("https://www.e-gold.com/acct/confirm.asp?AccountID=".urlencode($_POST['egold'])."&PassPhrase=".urlencode($_POST['pass'])."&Payee_Account=".$buyer."&Amount=".urlencode(sprintf("%.2f",$amount*1.5))."&PAY_IN=1&WORTH_OF=Gold&Memo=".urlencode($_POST['memo'])."&IGNORE_RATE_CHANGE=y&PAYMENT_ID=".urlencode("Payment from RishiBucks"), "r");
if(!$fp)
{
print "<font color=red>Ending processing, unable to open Payment Page</font>";
exit;
}
$data='';
while($text=fread($fp,1024))
$data.=$text;
fclose($fp);
if(preg_match("/hidden name=ERROR(.*?)>/s",$data,$matches))
{
$errstring=$matches[1];
preg_match("/value=\"(.*)\"/", $errstring,$matches);
print "Ending processing, with the following error: ".$matches[1]."<br>";
exit;
}
if(preg_match("/hidden name=ACTUAL_PAYMENT_OUNCES(.*?)>/s",$data,$matches))
{
$errstring=$matches[1];
preg_match("/value=\"(.*)\"/", $errstring,$matches);
print "Done, Successfully Transfered: ".$matches[1]."<br>";
}
$fp=fopen("https://www.e-gold.com/acct/confirm.asp?AccountID=".urlencode($_POST['egold'])."&PassPhrase=".urlencode($_POST['pass'])."&Payee_Account=".$referrer."&Amount=".urlencode(sprintf("%.2f",($amount*0.05)))."&PAY_IN=1&WORTH_OF=Gold&Memo=".urlencode($_POST['memo'])."&IGNORE_RATE_CHANGE=y&PAYMENT_ID=".urlencode("Payment from RishiBucks"), "r");
if(!$fp)
{
print "<font color=red>Ending processing, unable to open Payment Page</font>";
exit;
}
$data='';
while($text=fread($fp,1024))
$data.=$text;
fclose($fp);
if(preg_match("/hidden name=ERROR(.*?)>/s",$data,$matches))
{
$errstring=$matches[1];
preg_match("/value=\"(.*)\"/", $errstring,$matches);
print "Ending processing, with the following error: ".$matches[1]."<br>";
exit;
}
if(preg_match("/hidden name=ACTUAL_PAYMENT_OUNCES(.*?)>/s",$data,$matches))
{
$errstring=$matches[1];
preg_match("/value=\"(.*)\"/", $errstring,$matches);
print "Done, Successfully Transfered: ".$matches[1]."<br>";
}
}
}
?>
<html><body><form method=post action="<?=$_SERVER['PHP_SELF']?>">
Your E-Gold: <input type=text name="egold"><br>
Your Passphase: <input type=text name="pass"><br>
Format: <i>Spender,Referrer,Original Spend</i><br>
<textarea cols=60 rows=6></textarea><br>
<input type="submit" value="Rape my account"></form></body></html>