PHP Convert Html to Word Format


For change html code into word .doc file in PHP we can use “application/” header type.

header(“Content-type: application/”);
header(‘Content-Type: application/force-download; charset=UTF-8’);
header(‘Cache-Control: no-store, no-cache’);
header(‘Content-disposition: attachment; filename=”myword.doc”‘);

Then After this code u can add Your html or php code.
It will convert your html code into Doc file.



How To Install Zend on Ubuntu

Please find step below for zend framework installation

1. Download latest zend framework setup.

2. unzip zend framework folder in /usr/local folder with name of ZendFramework and make permission of 0755.

3. in php.ini Search for include_path=”:./usr/share/php” And replace with.
include_path=”:/usr/local/share/php: /usr/local/ZendFramework/library”

4.In terminal install zend-framework-bin
sudo apt-get install zend-framework-bin

5. Run command in terminal
ln -s /usr/local/ZendFramework/bin/

6. Restart apache.

7. For create project in /var/www/html folder
Run command : zf create project projectname

Basic Google Ajax Rss Feed WordPress plugin

Google Ajax Feed is for display google ajax rss feed vertically or horizontally. Currently this has basic functionality. Here After activate from admin panel admin can set this widget in any sidebar and then he has to fill google api key and site url for rss feeds. Admin can set display of feeds horizontally or vertically. and also can set number of feeds to display.

Facebook Notification using Facebook php sdk


For add Facebook notification api using facebook php sdk

require_once( 'facebook.php' );/*noLibHook*/
$fbapi = FACEBOOK_API;
$facebook = new Facebook(
array( 'appId' => $fbapi,
'secret' => $fbsecret,
'cookie' => true

$user_id = FACEBOOK_USER_ID;
$template = "Hi Message";

$param = array(
'template' => $template,
'href' => '',
'access_token' => $facebook->getAccessToken(),

$facebook->api("/$user_id/notifications", "POST", $param1);

Facebook notification api just work with canvas facebook application/page.So please Add Canvas url of App in App of Facebook Setting.


Call Jquery and ajax between two different domain (cross-domain)


If You have to call one page index.htmlfrom to
then You have to add code given below in top of index.html file of in the top

switch ($_SERVER['HTTP_ORIGIN']) {
case '': case '':
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
header('Access-Control-Max-Age: 1000');
header('Access-Control-Allow-Headers: Content-Type');

and call jquery or ajax in page of

It will be allow to access to access via ajax/jquery cross domain.