“Debug Log” is good sort of tool for monitoring programs. Trouble shooting is quite simple with Log Files. Log file can be used with analysis tools, it’s possible to get a good idea of where errors are coming from, how often errors return. Here you can see a simple PHP script to trace PHP programs… debugLog.php …………………. function debugLog($log, $text) { $log_dir = dirname($log); if( ...
Web Services with SOAP in PHP
The SOAP and XML-RPC extensions are packaged with the PHP 5 installation. The SOAP extension and the XML-RPC extension are not enabled by default in a PHP installation. To enable the SOAP and XML-RPC extensions add the following extension directives in the php.ini configuration file. extension=php_xmlrpc.dll extension=php_soap.dll Restart the Apache server to activate the SOAP and XML-RPC...
How to read excel file in php
<?php // SimpleXLSX php class v0.4 // MS Excel 2007 workbooks reader // Example: // $xlsx = new SimpleXLSX(‘book.xlsx’); // print_r( $xlsx->rows() ); // Example 2: // $xlsx = new SimpleXLSX(‘book.xlsx’); // print_r( $xlsx->rowsEx() ); // Example 3: // $xlsx = new SimpleXLSX(‘book.xlsx’); // print_r( $xlsx->rows(2) ); // second worksheet...
Code to add facebook share button
<script> function fbs_click() { u=location.href; t=document.title; window.open(‘(u)+’&t=’+encodeURIComponent(t),’sharer’, ‘toolbar=0, status=0, width=626, height=436’); return false; } </script> <a rel=”nofollow” href=”javascript://” onclick=”return fbs_click();” style=”background:url( …...
Skype is conflicting Wamp server. OR Wamp server error – though it is online,it is not working properly and showing orange color on quick launch icon.
Wamp server showing above error massage- Could not execute menu item (internal error). [execution ] Could not perform service action: The service has not been started. This error is fault of Apache service of Wamp server. To solve this error- 1. left click on quick launch icon of wamp server . 2.then goto Apache–> Service–>click on Test Port 80. the following screen will appear...
To get geo location OR longitude and latitude current location OR current Location of user
To get longitude and latitude of current location there is simple java script function given below — <script> /*Location functions here*/ function getUserLocation() { //check if the geolocation object is supported, if so get position if (navigator.geolocation) navigator.geolocation.getCurrentPosition(displayLocation, displayError); else document...
To add Print button on your web page.
Adding Print Button on your web page is very simple . I am giving you following simple example. <html> <head> <title>Print Test</title> </head> <body> <h1>Print Test</h1> <input type=”button” onClick=”window.print()” value=”Print This Page”/> </body> </html> The most important is ‘on click...
How to add share buttons on web Page .or To add plugin of social networking site to your web page .
It is very very simple work to add share button on your webpage . there are ready made code available for that . you have to just go to this url:- . in this url , you will find the code of all share button like facebook,twittrer, google+,gmail ,yahoomail and lots more near about there are 50 to 60 share button on this page . you have to just copy and paste these buttons code. You have privilege...
Extracting data from Apple iTunes
I tried a lot to find RSS feeds for latest apps getting posted on Apple iTunes store under all categories but couldnt find anywhere, not sure why Apple does not provide such feed. So I decided to write one of my own and below is how I accomplished the task using curl in php. Through httpfiddler I first out request headers sent by iTunes software and used the same. <?php function...
Charset in php
For Example to support Chinese Language web site <meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ /> //Inserting & Retrieving data from database mysql_query (“set character_set_results=’gb2312′”); or mysql_set_charset(“gb2312”); or mysql_query(“SET NAMES gb2312”); Please follow below link you...