[OUR PARTNERS: GoldRater | HYIPMailer | Autosurfs.net ]our advertising disclaimer | Disclaimer - Must be read before using forum or clicking any links
TeamEarners.com
Make Money even without investing money
GMT2U - SAFE & STABLE INVESTMENT
The serious and long term project. Accept Libertyreserve and Perfectmoney. 5% referral.
BlockDOS.net - DDOS Protected Web Hosting!
The same protection that Talkgold Uses! Starting at $400/month when you mention Talkgold! The most reliable DDOS protection online!
Put your banner or text ad in the rotation above!ONLY $17/day, $99/week, or $379/month!


Your Ad Here!
Your Ad Here

above banners and links are advertisements only. We do not endorse or vouch for any advertisers.Put Your 728X90 Banner Here NOW!

Go Back   Talkgold HYIP, Investment & Money Forum > Caution : Risky High Yield Investing Programs > HYIP - AutoSurf Program Admin Talk
User Name
Password
Reply
 
Thread Tools Display Modes
  #1  
Old 09-07-2007, 09:39 AM
dr_goldgame's Avatar
dr_goldgame dr_goldgame is offline
Investor
Join Date: May 2006
Posts: 326
Default LibertyReserve money transfer API code -- Working Version !!!

Finally I got it to works, below is the sample code, work perfectly for me.

You ONLY need to modify the following variable:--
$APIname,$securityWord,$payerAcct,$payeeAcct,$amount,$memo,$isPrivate

And call the function "transferMoney()", and you are done !!!

Note: I use PHP version of SHA256 instead of mHash module so the code can be used without library and will work with PHP4.

I appreciate a donation of $0.01 if you ever use the code for transfer testing. The payee account set to mine, you can set to any other account you like..............

LibertyReserve Programmatic Autopay Script:--

<?php

require('sha256.inc.php');

function generateId() {
return time().rand(0,9999);
}

function createAuthToken($securityWord) {
$datePart = gmdate("Ymd");
$timePart = gmdate("H");

$authString = $securityWord.":".$datePart.":".$timePart;

$token = strtoupper(SHA256::hash($authString));

return $token;
}

function xmlBody($APIname,$securityWord,$payerAcct,$payeeAc ct,$amount,$memo,$isPrivate) {

return trim(
"<TransferRequest id='".generateId()."'>".
"<Auth>".
"<ApiName>".$APIname."</ApiName>".
"<Token>".createAuthToken($securityWord)."</Token>".
"</Auth>".
"<Transfer>".
"<TransferType>transfer</TransferType>".
"<Payer>".$payerAcct."</Payer>".
"<Payee>".$payeeAcct."</Payee>".
"<CurrencyId>LRUSD</CurrencyId>".
"<Amount>".$amount."</Amount>".
"<Memo>".$memo."</Memo>".
"<Anonymous>".$isPrivate."</Anonymous>".
"</Transfer></TransferRequest>");

}

function transferMoney($APIname,$securityWord,$payerAcct,$p ayeeAcct,$amount,$memo,$isPrivate='false'){

$xmlBody = urlencode(xmlBody($APIname,$securityWord,$payerAcc t,$payeeAcct,$amount,$memo,$isPrivate));
$MONEY_TRANSFER_API_URL = 'https://api.libertyreserve.com/xml/transfer.aspx?req='.$xmlBody;
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL, $MONEY_TRANSFER_API_URL);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
ob_start();
curl_exec ($ch);
ob_end_clean();
curl_close ($ch);

}


$APIname = 'Your_API_name';
$securityWord = 'security_word';
$payerAcct = 'Your LR A/c Number';
$payeeAcct = 'U6796585';
$amount = 0.01;
$memo = 'test transfer';
$isPrivate = 'false';

transferMoney($APIname,$securityWord,$payerAcct,$p ayeeAcct,$amount,$memo,$isPrivate);

?>



SHA256 PHP based version (safe the file as sha256.inc.php) :--


<?php

/************************************************** *****************************
*
* SHA256 static class for PHP4, debug output version
* implemented by feyd _at_ devnetwork .dot. net
* specification from http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf
*
* Copyright 2005 Developer's Network. All rights reserved.
* This is licensed under the Lesser General Public License (LGPL)
*
* Thanks to CertainKey Inc. for providing some example outputs in Javascript
*
*----- Version 1.0.1 ----------------------------------------------------------
*
* Syntax:
* string SHA256::hash( string message[, string format ])
*
* Description:
* SHA256::hash() is a static function that must be called with `message`
* and optionally `format`. Possible values for `format` are:
* 'bin' binary string output
* 'hex' default; hexidecimal string output (lower case)
*
* Failures return FALSE.
*
* Usage:
* $hash = SHA256::hash('string to hash');
*
************************************************** ****************************/

// hashing class state and storage object. Abstract base class only.

class hashData

{

// final hash

var $hash = null;

}





// hashing class. Abstract base class only.

class hash

{

// The base modes are:

// 'bin' - binary output (most compact)

// 'bit' - bit output (largest)

// 'oct' - octal output (medium-large)

// 'hex' - hexidecimal (default, medium)



// perform a hash on a string

function hash($str, $mode = 'hex')

{

trigger_error('hash::hash() NOT IMPLEMENTED', E_USER_WARNING);

return false;

}



// chop the resultant hash into $length byte chunks

function hashChunk($str, $length, $mode = 'hex')

{

trigger_error('hash::hashChunk() NOT IMPLEMENTED', E_USER_WARNING);

return false;

}



// perform a hash on a file

function hashFile($filename, $mode = 'hex')

{

trigger_error('hash::hashFile() NOT IMPLEMENTED', E_USER_WARNING);

return false;

}



// chop the resultant hash into $length byte chunks

function hashChunkFile($filename, $length, $mode = 'hex')

{

trigger_error('hash::hashChunkFile() NOT IMPLEMENTED', E_USER_WARNING);

return false;

}

}





// ------------





class SHA256Data extends hashData

{

// buffer

var $buf = array();



// padded data

var $chunks = null;



function SHA256Data($str)

{

$M = strlen($str); // number of bytes

$L1 = ($M >> 28) & 0x0000000F; // top order bits

$L2 = $M << 3; // number of bits

$l = pack('N*', $L1, $L2);



// 64 = 64 bits needed for the size mark. 1 = the 1 bit added to the

// end. 511 = 511 bits to get the number to be at least large enough

// to require one block. 512 is the block size.

$k = $L2 + 64 + 1 + 511;

$k -= $k % 512 + $L2 + 64 + 1;

$k >>= 3; // convert to byte count



$str .= *****0x80) . str_repeat(*****0), $k) . $l;



assert('strlen($str) % 64 == 0');



// break the binary string into 512-bit blocks

preg_match_all( '#.{64}#', $str, $this->chunks );

$this->chunks = $this->chunks[0];

$this->hash = array

(

1779033703, -1150833019,

1013904242, -1521486534,

1359893119, -1694144372,

528734635, 1541459225,

);

}

}





// static class. Access via SHA256::hash()

class SHA256 extends hash

{

function hash($str, $mode = 'hex')

{

static $modes = array( 'hex', 'bin', 'bit' );

$ret = false;



if(!in_array(strtolower($mode), $modes))

{

trigger_error('mode specified is unrecognized: ' . $mode, E_USER_WARNING);

}

else

{

$data =& new SHA256Data($str);



SHA256::compute($data);



$func = array('SHA256', 'hash' . $mode);

if(is_callable($func))

{

$func = 'hash' . $mode;

$ret = SHA256::$func($data);

//$ret = call_user_func($func, $data);

}

else

{

trigger_error('SHA256::hash' . $mode . '() NOT IMPLEMENTED.', E_USER_WARNING);

}

}



return $ret;

}



// ------------

// begin internal functions



// 32-bit summation

function sum()

{

$T = 0;

for($x = 0, $y = func_num_args(); $x < $y; $x++)

{

// argument

$a = func_get_arg($x);



// carry storage

$c = 0;



for($i = 0; $i < 32; $i++)

{

// sum of the bits at $i

$j = (($T >> $i) & 1) + (($a >> $i) & 1) + $c;

// carry of the bits at $i

$c = ($j >> 1) & 1;

// strip the carry

$j &= 1;

// clear the bit

$T &= ~(1 << $i);

// set the bit

$T |= $j << $i;

}

}



return $T;

}





// compute the hash

function compute(&$hashData)

{

static $vars = 'abcdefgh';

static $K = null;



if($K === null)

{

$K = array (

1116352408, 1899447441, -1245643825, -373957723,

961987163, 1508970993, -1841331548, -1424204075,

-670586216, 310598401, 607225278, 1426881987,

1925078388, -2132889090, -1680079193, -1046744716,

-459576895, -272742522, 264347078, 604807628,

770255983, 1249150122, 1555081692, 1996064986,

-1740746414, -1473132947, -1341970488, -1084653625,

-958395405, -710438585, 113926993, 338241895,

666307205, 773529912, 1294757372, 1396182291,

1695183700, 1986661051, -2117940946, -1838011259,

-1564481375, -1474664885, -1035236496, -949202525,

-778901479, -694614492, -200395387, 275423344,

430227734, 506948616, 659060556, 883997877,

958139571, 1322822218, 1537002063, 1747873779,

1955562222, 2024104815, -2067236844, -1933114872,

-1866530822, -1538233109, -1090935817, -965641998,

);

}

$W = array();

for($i = 0, $numChunks = sizeof($hashData->chunks); $i < $numChunks; $i++)

{

// initialize the registers

for($j = 0; $j < 8; $j++)

${$vars{$j}} = $hashData->hash[$j];

// the SHA-256 compression function

for($j = 0; $j < 64; $j++)

{

if($j < 16)

{

$T1 = ord($hashData->chunks[$i]{$j*4 }) & 0xFF; $T1 <<= 8;

$T1 |= ord($hashData->chunks[$i]{$j*4+1}) & 0xFF; $T1 <<= 8;

$T1 |= ord($hashData->chunks[$i]{$j*4+2}) & 0xFF; $T1 <<= 8;

$T1 |= ord($hashData->chunks[$i]{$j*4+3}) & 0xFF;

$W[$j] = $T1;

}

else

{

$W[$j] = SHA256::sum(((($W[$j-2] >> 17) & 0x00007FFF) | ($W[$j-2] << 15)) ^ ((($W[$j-2] >> 19) & 0x00001FFF) | ($W[$j-2] << 13)) ^ (($W[$j-2] >> 10) & 0x003FFFFF), $W[$j-7], ((($W[$j-15] >> 7) & 0x01FFFFFF) | ($W[$j-15] << 25)) ^ ((($W[$j-15] >> 18) & 0x00003FFF) | ($W[$j-15] << 14)) ^ (($W[$j-15] >> 3) & 0x1FFFFFFF), $W[$j-16]);

}



$T1 = SHA256::sum($h, ((($e >> 6) & 0x03FFFFFF) | ($e << 26)) ^ ((($e >> 11) & 0x001FFFFF) | ($e << 21)) ^ ((($e >> 25) & 0x0000007F) | ($e << 7)), ($e & $f) ^ (~$e & $g), $K[$j], $W[$j]);

$T2 = SHA256::sum(((($a >> 2) & 0x3FFFFFFF) | ($a << 30)) ^ ((($a >> 13) & 0x0007FFFF) | ($a << 19)) ^ ((($a >> 22) & 0x000003FF) | ($a << 10)), ($a & $b) ^ ($a & $c) ^ ($b & $c));

$h = $g;

$g = $f;

$f = $e;

$e = SHA256::sum($d, $T1);

$d = $c;

$c = $b;

$b = $a;

$a = SHA256::sum($T1, $T2);

}



// compute the next hash set

for($j = 0; $j < 8; $j++)

$hashData->hash[$j] = SHA256::sum(${$vars{$j}}, $hashData->hash[$j]);


}

}





// set up the display of the hash in hex.

function hashHex(&$hashData)

{

$str = '';



reset($hashData->hash);

do

{

$str .= sprintf('%08x', current($hashData->hash));

}

while(next($hashData->hash));



return $str;

}





// set up the output of the hash in binary

function hashBin(&$hashData)

{

$str = '';



reset($hashData->hash);

do

{

$str .= pack('N', current($hashData->hash));

}

while(next($hashData->hash));



return $str;

}

}





// dump passed memory

function memdump($data, $brk = 0)

{

if(is_array($data))

{

$n = 0;

$b = -1;

$brk_step = $brk - 1;



$o = '';

for($n = 0, $y = sizeof($data); $n < $y; $n++, $b %= $brk)

{

if($n != 0)

{

if($brk > 0)

{

$o .= ($b == $brk_step ? "\n" : ' ');

}

else

{

$o .= ' ';

}

}



$o .= memdump($data[$n]);



++$b;

}



$o .= "\n";

}

else

{

$n = 0;

$b = 0;

if(is_integer($data) || is_float($data))

$data = pack('N',$data);

$o = '';

for($i = 0, $j = strlen($data); $i < $j; $i++, $b = $i % 4)

{

$o .= sprintf('%02x', ord($data{$i}));

// only process when 32-bits have passed through

if($i != 0 && $b == 3)

{

// process new line points

if($n == 3)

$o .= "\n";

elseif($j > 4)

$o .= ' ';

++$n;

$n %= 4;

}

}

}



return $o;

}

?>

Last edited by dr_goldgame : 09-07-2007 at 10:23 AM.
Reply With Quote
-- Sponsored Links --
  #2  
Old 09-07-2007, 10:08 AM
tarek's Avatar
tarek tarek is offline
Folder Moderator
Join Date: Aug 2005
Location: Virtual Reality
Posts: 1,301
Default Re: LibertyReserve money transfer API code -- Working Version !!!

Thank you for sharing!
__________________
Forex Accounts management.
Start from Only $5000 for limited time.
1-10% monthly returns.
Tarek Forex Services
CTA, IB For Fxsol ( Open Real Forex Accont )
Reply With Quote
  #3  
Old 09-07-2007, 10:28 AM
dr_goldgame's Avatar
dr_goldgame dr_goldgame is offline
Investor
Join Date: May 2006
Posts: 326
Default Re: LibertyReserve money transfer API code -- Working Version !!!

Note that "$payeeAc ct" in the function xmlBody must be "$payeeAcct" and also "$p ayeeAcct" in transferMoney must be "$payeeAcct", not separate apart.

It is due to limitation of Talkgold message field.
Reply With Quote
  #4  
Old 09-07-2007, 10:34 AM
dr_goldgame's Avatar
dr_goldgame dr_goldgame is offline
Investor
Join Date: May 2006
Posts: 326
Default Re: LibertyReserve money transfer API code -- Working Version !!!

For masspay version by LibertyReserve please download from

http://files-upload.com/files/486195...sspay-1.0b.zip

For the above programmatic autopay script, please download from

http://files-upload.com/files/486211...y_transfer.zip

so you won't need to copy and paste.

Cheeeeer !!!!
Reply With Quote
  #5  
Old 09-07-2007, 11:40 AM
dr_goldgame's Avatar
dr_goldgame dr_goldgame is offline
Investor
Join Date: May 2006
Posts: 326
Default Re: LibertyReserve money transfer API code -- Working Version !!!

This is script for checking your LR balance, please download from:--

http://files-upload.com/files/486291...ance_check.php
Reply With Quote
  #6  
Old 09-07-2007, 12:45 PM
EveryHYIP.com's Avatar
EveryHYIP.com EveryHYIP.com is offline
VIP Investor
Join Date: Feb 2006
Posts: 1,278
Default Re: LibertyReserve money transfer API code -- Working Version !!!

Thank you for your kind work and sharing.
__________________
- EveryHYIP.com - HYIP Services Site Since 2005
Accept LibertyReserve, V-Money and e-Gold.
Reply With Quote
  #7  
Old 09-07-2007, 12:52 PM
dr_goldgame's Avatar
dr_goldgame dr_goldgame is offline
Investor
Join Date: May 2006
Posts: 326
Default Re: LibertyReserve money transfer API code -- Working Version !!!

Quote:
Originally Posted by EveryHYIP.com
Thank you for your kind work and sharing.
Do the scripts work for you ?

And I just safe you all something like $50 if you hire someone from scriptlance to code for you. Now you get this free from me !!!

Cheer..........
Reply With Quote
  #8  
Old 09-07-2007, 01:00 PM
EveryHYIP.com's Avatar
EveryHYIP.com EveryHYIP.com is offline
VIP Investor
Join Date: Feb 2006
Posts: 1,278
Default Re: LibertyReserve money transfer API code -- Working Version !!!

Quote:
Originally Posted by dr_goldgame
Do the scripts work for you ?

And I just safe you all something like $50 if you hire someone from scriptlance to code for you. Now you get this free from me !!!

Cheer..........
Didn't test it. I have PHP5 environment and no need for SHA256 file.
If you have PHP5 just use this $token = hash('sha256',$authString); to produce SHA256 token.

And for your code use this
$token = SHA256::hash($authString,'HEX');
This will give you upper case string, no need to use strtoupper.
__________________
- EveryHYIP.com - HYIP Services Site Since 2005
Accept LibertyReserve, V-Money and e-Gold.
Reply With Quote
  #9  
Old 09-07-2007, 01:09 PM
dr_goldgame's Avatar
dr_goldgame dr_goldgame is offline
Investor
Join Date: May 2006
Posts: 326
Default Re: LibertyReserve money transfer API code -- Working Version !!!

Quote:
Originally Posted by EveryHYIP.com
Didn't test it. I have PHP5 environment and no need for SHA256 file.
well if you don't use the attached SHA256 file, then you must modify my script.

refer to official LibertyReserve masspay scripts there.

or I think you can direct call the PHP5 SHA256 function, not sure that. I have no PHP5 with me.

anyway the attached SHA256 file will work great in PHP5 too.
Reply With Quote
  #10  
Old 09-07-2007, 01:20 PM
EveryHYIP.com's Avatar
EveryHYIP.com EveryHYIP.com is offline
VIP Investor
Join Date: Feb 2006
Posts: 1,278
Default Re: LibertyReserve money transfer API code -- Working Version !!!

Quote:
Originally Posted by dr_goldgame
well if you don't use the attached SHA256 file, then you must modify my script.

refer to official LibertyReserve masspay scripts there.

or I think you can direct call the PHP5 SHA256 function, not sure that. I have no PHP5 with me.

anyway the attached SHA256 file will work great in PHP5 too.

$token = SHA256::hash($authString,'HEX');
Test in php4 and php5, OK

$token = hash('sha256',$authString);
Test in php5, OK (This is for php5 only)
__________________
- EveryHYIP.com - HYIP Services Site Since 2005
Accept LibertyReserve, V-Money and e-Gold.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


TALKGOLD
SIDEBAR ADS

ADVERTISE HERE. Must read: Advertising Terms & Disclaimer
PUT YOUR 120X120 AD HERE FOR ONLY $275/WEEK!
Click Here for details.
Your ad here! Cost of Ad - $270
Your ad here! Cost of Ad - $265
Your ad here! Cost of Ad - $260
Your ad here! Cost of Ad - $210
Your ad here! Cost of Ad - $190
Your ad here! Cost of Ad - $150
Your ad here! Cost of Ad - $150
Your ad here! Cost of Ad - $140
Your ad here! Cost of Ad - $130
BlockDOS.net
The absolute best DDOS Protection at the most affordable prices. Endorsed by Talkgold.com
Cost of Ad - $110
Your ad here! Cost of Ad - $75
Your ad here! Cost of Ad - $75
YOUR AD HERE

PUT YOUR NON-ROTATING AD HERE NOW!
ONLY $75/Week


click here
click here
YOUR AD HERE!
YOUR AD HERE!
WWW.NVHSERVER.COM

Excellent HYIP Hosting + Autosurf Hosting! Accept Almost E-currency Payment Processors! 24/7 Super Support!

Only $39/week or $135/month - Advertise Now!
500% AFTER 3 HOURS

500% After 3 Hours [Fully Instant Payments]
1000% After 24 Hours [Fully Instant Payments]
STATUS = PAYING
Only $39/week or $135/month - Advertise Now!
Check our Advertising Rates!

All times are GMT. The time now is 12:48 PM.

Add to Google

Protected by BlockDOS.net - DDOS Protection
Powered by: vBulletin - Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.