CMX Ads Webmaster Resources for Success

Websites, Advertising, Scripts Tips n Snippets

News: Window OS Backdoor to the NSA Exposed

If you want an editable encrypted secure form input for paypal buy now buttons or any form here it is!

Hi!. I added a second system to secure your form data that uses no database or dynamics and works with your static form data input.
I came up with my own encryption function with a salt validation.

Enter your input values right in encryption function in the form.

You post the form either to another page or to self dont matter.
Script filters post array for any image key values that are not encoded from image submit
then decodes form data and validates your md5 salt is where its supposed to be and exists.
If not script exits with error. We then build the query string and send off to PayPal.
The string is added to the pay pal url and redirected to their site.
Thats it!! You can now checkout. All data was posted.

Hope you like it and use it and find it useful!

Want another way to secure your static and dynamic form data? Like Monty Python says: Thats only one way, just one way to kill a rasberry killer. From the Fresh fruit sketch!!lol
Click here for an editable dynamic secure paypal buy now button system.

  1: <?php
2:
//I clean post and get like this
3:     
function clean($text)
4: {
5:     
$text strip_tags($text);
6:     
$text htmlspecialchars($textENT_QUOTES);
7:     
$text trim($text);
8:     return (
$text); //output clean text
9:
}
10:   
//your salt to validate    
11:   
$salt=md5('salt');
12:      
//  echo $salt;
13:       //encode function. a little redundant but WTF!
14:      
function encode_input($res){
15:      global 
$salt;
16:      
//you know what this is I hope
17:      
$res=trim($res);
18:       
//reverse input
19:      
$res=strrev($res);
20:      
//base 64 encode
21:      
$res=base64_encode($res);
22:      
//add salt to end of string
23:      
$res=$res.$salt;
24:      
//reverse string again
25:      
$res=strrev($res);
26:      
//base 64 encode again
27:      
$res2=base64_encode($res);
28:      
//return ecoded input
29:       
return $res2;    
30:     }
31:     
32:
//decode function reverses above function
33:     
function decode_input($res){
34:      global 
$salt;
35:      
//base 64 decode input
36:      
$res=base64_decode($res);
37:      
//reverse string
38:      
$res=strrev($res);
39:      
//check  md5 salt
40:   
if (substr($res, -32)!= $salt){
41:     return 
false;
42:      }else{
43:     
//remove salt from string md5 is 32 char long
44:     
$res1 substr($res,0, -32);
45:      
//decode string again
46:      
$res1=base64_decode($res1);
47:      
//reverse string again
48:      
$res1=strrev($res1);
49:      
//return decoded input
50:       
return $res1;    
51:       }
52:     }
53:
54:
//prepare query string to send to paypal
55:  
$final='?';
56: if(isset(
$_POST['amount'])){ //can be any input key,not image submit
57:
$data array_map('clean'$_POST);
58:
//if you use paypal image button must unset these sent with image submit.
59: //They are not ecoded and function will return false
60:
unset($data['submit_x']);
61: unset(
$data['submit_y']);
62:
//if you use just a submit button. this is the submit name not value
63: // unset($data['submit']);
64: // print_r($data);
65:
foreach($data as $key => $value){
66:  
//validate salt decoded in input value
67:
if(decode_input($value)){
68:
//decode each value
69:
$value=decode_input($value);
70:
//url encode
71:
$value urlencode($value);
72:
//Build query string
73:
$final .= "$key=$value&";
74: }else{
75:  echo 
'error';
76:  exit;
77:  }
78: }
79:
//send data to paypal checkout
80:   
header('location:https://www.paypal.com/cgi-bin/webscr'.$final);  
81:   exit();
82: }
83:
//echo $final;
84: //exit;
85:
86:
?>
87:
Your form. Can be any for shown with pay pal buy now.
88: Posting data to our send to paypal script
89: <form action="" method="post"> 
90: <label>Purchase: Universal Affiliate 20.00</label> 
91: <input type="hidden" name="cmd" value="<?php echo encode_input('_xclick'); ?>">
92: <input type="hidden" name="rm" value="<?php echo encode_input('2'); ?>">
93: <input type="hidden" name="return" value="<?php echo encode_input('http://www.return.com'); ?>">
94: <input type="hidden" name="cancel_return" value="<?php echo encode_input('http://www.cancel.com'); ?>">
95: <input type="hidden" name="business" value="<?php echo encode_input('me@cmxads.com'); ?>"> 
96: <input type="hidden" name="item_name" value="<?php echo encode_input('Universal Affiliate'); ?>"> 
97: <input type="hidden" name="item_number" value="<?php echo encode_input('UA38534'); ?>"> 
98: <input type="hidden" name="amount" value="<?php echo encode_input('20.00'); ?>"> 
99: <input type="hidden" name="no_note" value="<?php echo encode_input('1'); ?>"> 
100: <input type="hidden" name='currency_code' value="<?php echo encode_input('USD'); ?>">
101: <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt=""> 
102: </form>
Click here to download

Please help me

Donate Bitcoin

Please help me I am handicapped and support myself

Donate With PayPal

 

Donate Bitcoin

Please donate and help the handicapped.

16KFkxbDSSqq5RefxCSDSDa3j6EHx1kpiP



Please help me I am handicapped and support myself

Donate With PayPal

 

Donate Bitcoin

Please donate and help the handicapped.

1KtuX6N6xM2YxijE7JfPeHZmtGKGQwgfpc



name:Freddy Date:08.7.22 @ 06:21am IP:.1.217131498.0
Thanks I love you I sent you 58 cents.


name:Coralee Date:08.7.22 @ 06:21am IP:1.01219143.87.
A great help thanks I sent you 35 cents.


name:Moses Date:08.7.22 @ 06:21am IP:138.1104.27.19
Thanks you are awesome I sent you 6 cents.




Name:
Click Here to Reload

My websites do not use cookies or any google spyware.

 

Quick Support: Make it short.
Email:

Message: