Monthly Archives: July 2014

PHP SOAP V.S. .Net Web Service

Keys:

  • Datetime formate: 1961-12-21T00:00:00
  • The way to pass parameters to .Net web service is very weird:
    array($params)
    array('parameters'=>$params)
  • Response will be an object of stdClass, not XML!
    Well, I think this is weird but convenient to handle the response values.

Regerence:

PHP Example Code:

Response Structure:

 

Prevent Invalid Click (Google)

What you can't do:

  • Prevent people spoofing their IPs.
  • Block IP addresses on sites you don't control (e.g. Google search results).

What you can do:

Google employs automatic filters to combat click fraud and invalid clicks, but has a number of suggestions for things you can do to monitor and detect invalid clicks yourself:

Reference:

Keep Leading 0 of Numbers in Excel

By default, the leading 0 will be removed if the value is a number:

Solution:

Reference:

Share Preview Image Setting of Facebook

Best Practice

https://developers.facebook.com/docs/sharing/best-practices#–

Recommended Image Size: 1080×565

Have better to include following 3 scripts: (#2 could be the most important)

Reference:

FB Debug Tool:

Dynamic Like Button (With share):

Reference:

Sharer:

PHP Web Service: nusoap

Keys to access .Net web service:

  1. Datetime formate: 1961-12-21T00:00:00
  2. If passing a null parameter, "xsi:nil=true" attribute must be added. e.g. <deduct xsi:nil="true" />
  3. Use "soapval" to add data type attributes of a parameter.
    e.g. 'assuredBirth' => new soapval('assuredBirth', 'dateTime', '1961-12-21T00:00:00', false, 'http://www.w3.org/2001/XMLSchema')
  4. Null DateTime: 0001-01-01T00:00:00
  5. Conclusion: .Net web services don't like nusoap!! Try to use native soap functions of PHP.
    http://tw1.php.net/soap
     

Useful tool to test web services:

  1. wizdl: Amazing tool to test .Net web services:
    http://wizdl.codeplex.com/
  2. SOAP Client:
    http://www.soapclient.com/soapclient

Web Service Example:

Reference:

Tools:

Complete successful SOAP request: