Eric @ EricBess WebHome

Wins do not arrogant, not to lose hungry, there is shock chest and face, such as mine Pinghu

Chinese (Simplified) flagItalian flagKorean flagPortuguese flagEnglish flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroat flagDanish flagFinnish flagHindi flagPolish flagRumanian flagSwedish flagNorwegian flagCatalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flagSlovak flagSlovenian flagUkrainian flagVietnamese flag
By N2H

JavaScript is called SOAP

Would like to have been directly JavaScrip call Xurrency.com of SOAP, the realization of the exchange rate of AJAX, to find a JavaScript SOAP Client done a test. Local on IE, Chrome successful return, firefox with the host on the error, "access to restricted URI DENIED" I do not know why his.

Decided to give up. Using php soapclient + jquery ajax to achieve.

JavaScript SOAP Client test code is as follows:

? Download test.html
 1 
 2 
 3 
 4 
 5 
 6 
 7 
 8 
 9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 
 21 
 22 
 23 
 24 
 25 
 26 
 27 
 28 
 29 
  "-//W3C//DTD XHTML 1.0 Strict//EN" <! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN"  
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
  "http://www.w3.org/1999/xhtml"  lang = "en"  xml : lang = "en" > <Html xmlns = "http://www.w3.org/1999/xhtml" lang = "en" xml: lang = "en"> 
  <Head> 
  XHTML - document </ title > <Title> XHTML - document </ title> 
  "text/javascript"  src = "soapclient.js" ></ script > <Script type = "text / javascript" src = "soapclient.js"> </ script> 
  "text/javascript" > <Script type = "text / javascript"> 

	  function currency () ( 
		  "http://xurrency.com/servidor_soap.php" ; var url = "http://xurrency.com/servidor_soap.php"; 
		  new  SOAPClientParameters ( ) ; var pl = new SOAPClientParameters (); 
		  "amount" , 5 ) ; pl. add ( "amount", 5); 
		  "base" , "usd" ) ; pl. add ( "base", "usd"); 
		  "target" , "eur" ) ; pl. add ( "target", "eur"); 
		  url , "getValue" ,  pl , true ,  Currency_callBack ) ; SOAPClient. Invoke (url, "getValue", pl, true, Currency_callBack); 
	  ) 

	  r ) { function Currency_callBack (r) ( 
		   r ) ; alert (r); 
		  ) 

  </ Script> 
  </ Head> 
  <Body> 
	  "" > <Form action = ""> 
  button value = "Invoke"  onclick = "currency();" /> <Input type = button value = "Invoke" onclick = "currency ();" /> 
  </ Form> 
  </ Body> 
  </ Html> 

November 10th, 2008 Posted by eric | Coding, Web technology | no comments

PayPal multi-currency support and the use of IPN

Paypal to receive the following support for the currency

Code Currency
AUD Australian Dollar
CAD Canadian Dollar
CHF Swiss Franc
CZK Czech Koruna
DKK Danish Krone
EUR Euro
GBP Pound Sterling
HKD Hong Kong Dollar
HUF Hungarian Forint
JPY Japanese Yen
NOK Norwegian Krone
NZD New Zealand Dollar
PLN Polish Zloty
SEK Swedish Krona
SGD Singapore Dollar
USD US Dollar

The use of multi-currency IPN

payment_gross and payment_fee: For non-US dollar payment, which is the value of the vacancy, so IPN script will not be such as the amount of dollars to deal with.

Multi-currency variables: For non-US dollar payment, IPN will add the following multi-currency variables, mc_gross and mc_fee
mc_gross: transaction fees deducted before the payment is received to pay the full amount of currency.
mc_fee: payment and paid currency-related transaction costs. Payment_fee similar to the variable function of the variables (such as the amount to be paid, the non-variable).
For rental IPN, such as registration, cancellation, modification, and the failure of EOT, mc_currency is the currency rates rather than monetary payment.

Click to continue reading

November 7th, 2008 Posted by eric | Web technology, financial and investment | no comments

Zend Studio debug Tips

How to Set $ _GET and $ _POST vars in the debugger

  1. Click on the 'variables' tab of your debug window. You will notice a lot of global, server, and environment vairables. Among them, you should see the empty $ _GET and $ _POST arrays.
  2. Right-click on either array and choose 'assign value.' To input an array, type it in this format: array (value1 => foo, value2 => bar, name => 'James Cricket')

November 4th, 2008 Posted by eric | unclassified | no comments

ZendDebugger for Freebad

Requester:

disable your ZendOptimizer and eaccelerator
download ZendDebugger.os place to / usr/local/lib/php/20060613 /

ZendDebugger.so for freebsd (2.2 MiB, 5 hits)
You need to be a registered user to download this file.

Install:

edit your php.ini. For me php.ini is in / usr / local / etc /

[Zend]
zend_extension=/usr/local/lib/php/20060613/ZendDebugger.so
zend_debugger.allow_hosts=10.10.2.0/24
zend_debugger.expose_remotely=always
zend_debugger.connector_port=10001

restart your apache

Look in the phpinfo () got the result below!

zenddebugger

Click to continue reading

November 3rd, 2008 Posted by eric | Coding, System, unclassified | no comments

php to prevent malicious applets visit

Originally written PAYPAL IPN response when used repeatedly to try to prevent a function of the protection of the poor, later changed to address the original audit ($ hostname = gethostbyaddr ($ _SERVER [ 'REMOTE_ADDR']); if (! Preg_match ( '/ paypal \. com $ / ', $ hostname)) {.....), it abandoned on the 000. In the record before the cut did not come, there should be a better algorithm, the study who do not know.

? View Code PHP
 1 
 2 
 3 
 4 
 5 
 6 
 7 
 8 
 9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
  ! avoid_refresh ( '15' ) ) die ( "Hacking Attempt!!" ) ; if (! avoid_refresh ('15 ')) die ( "Hacking Attempt!!"); 
  ..... 
  ..... 
  ..... 
  $time ) { function avoid_refresh ($ time) ( 
	  ; session_start (); 
    isset ( $_SESSION [ "post_sep" ] ) ) { if (isset ($ _SESSION [ "post_sep"])) ( 
        time ( ) - $_SESSION [ "post_sep" ] < $time ) { if (time () - $ _SESSION [ "post_sep"] <$ time) ( 
      	  "post_sep" ] = time ( ) ; $ _SESSION [ "Post_sep"] = time (); 
          ; return false; 
        { ) Else ( 
            "post_sep" ] = time ( ) ; $ _SESSION [ "Post_sep"] = time (); 
            ; return true; 
        ) 
    { ) Else ( 
        "post_sep" ] = time ( ) ; $ _SESSION [ "Post_sep"] = time (); 
        ; return true; 
    ) 
  ) 

October 30th, 2008 Posted by eric | Coding | no comments

PHP Data Encryption

Data encryption in our life has become increasingly important, especially in light of the network took place on a large number of transactions and transfer of large amounts of data. If you are interested in the adoption of safety measures, are also bound to be interested in learning PHP to provide a range of security features. In this article, we will introduce these features to provide some basic usage, so that you can own application software to add security features.

Prior knowledge

PHP in the details of the security function, we need to spend a bit of time has not come into contact with the contents of this area's readers some basic knowledge of cryptography, if the basic concepts of cryptography is already very familiar with, you can skip this part of the past .

Cryptography can be described as popular on the encryption / decryption of research and experiments, the encryption is easy to understand information is not easily converted to process information, not easily moving to decrypt the data is converted to the original easy-to-understand information. Do not understand the information referred to as passwords, easy-to-understand information, known as code.

The data encryption / decryption requires a certain algorithms can be very simple, such as the famous Caesar code, but the current encryption algorithm to be relatively much more complex, some of which make use of existing methods can not even decipher the.

PHP encryption function as long as there is one thing to use non-Windows platforms may experience crypt () is also quite familiar with the completion of this function is called a one-way encryption function, it can be a number of encryption codes, passwords can not be converted to the original The codes. Despite the face of it this seems to be a useless function, but it is widely used to guarantee the integrity of the system password. This is because once the one-way encrypted passwords fall into the hands of a third party who, as can not be reduced to express and therefore not much use. In the validation of user input a password, the user input is also used in a one-way algorithm, if the importation and storage of encrypted password after the match, then entered a message must be correct.

crypt () function

PHP also offers the use of its crypt () function to complete a one-way encryption. I will be here a brief introduction to the function:

string crypt (string input_string [, string salt])

Input_string the parameters need to be encrypted string, the second optional salt is a bit string, it can affect the encryption code, known as rule out further attacks are expected to count. By default, PHP using a 2-character string interfere with DES, if you are using the system MD5 (I will be introduced later in the MD5 algorithm), it will use a 12-character string of interference. By the way, can be found in order to implement the following system will be used to interfere with the length of the string:

print "My system salt size is:". CRYPT_SALT_LENGTH;

System may also support other encryption algorithm. crypt () to support four algorithm, which is supported by the following algorithm and the corresponding parameters of the length of salt:

Salt length of the algorithm
CRYPT_STD_DES 2-character (Default)
CRYPT_EXT_DES 9-character
CRYPT_MD5 12-character beginning with $
CRYPT_BLOWFISH 16-character beginning with $

1 2 3

October 30th, 2008 Posted by eric | Coding, unclassified | no comments

2 3 4 5 6 7 8 9 10 » ... Last » Page 1 of 29 1 2 3 4 5 6 7 8 9 10 »... Last»