PHP Convert Html to Word Format

Hi,

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

header(“Content-type: application/vnd.ms-word”);
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.

Thanks

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/zf.sh

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. http://wordpress.org/extend/plugins/google-ajax-rss-feed/

Facebook Notification using Facebook php sdk

Hi,

For add Facebook notification api using facebook php sdk

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

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

$param = array(
'template' => $template,
'href' => 'http://google.com',
'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.

thanks

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

Hi

If You have to call one page index.htmlfrom http://domain1.com to http://domain2.com
then You have to add code given below in top of index.html file of http://domain1.com in the top

switch ($_SERVER['HTTP_ORIGIN']) {
case 'http://domain1.com': case 'https://domain1.com':
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');
break;
}

and call jquery or ajax in page of http://domain2.com.

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

thanks.