Hi… I’m new in php script can anyone provide me the code for bookmarking the site and setting the site as your default homepage... Thanks a bunch….
You cannot Bookmark a page or set a page as homepage using PHP, since its a serverside language. You should use Javascript for that. Only IE 5+ supports changing homepage. Bookmark This Page Script: <script type="text/javascript"> function addBookmark(url, title){ if(!url){ url = document.location; title = title ? title : document.title; } if (window.sidebar) // Firefox 1.x+ window.sidebar.addPanel(title, url, ""); else if(window.opera && window.print){ // Opera 7+ var el = document.createElement('a'); el.setAttribute('href',url); el.setAttribute('title',title); el.setAttribute('rel','sidebar'); el.click(); } else if(document.all)// IE4+ window.external.AddFavorite(url, title); } </script> Code (markup): Use the following code to call the function <a href="javascript:addBookmark('http://forums.digitalpoint.com/showthread.php?p=2428165', 'Bookmarking and make this as your homepage code on php')">Bookmark this Page</a> Code (markup): or <a href="javascript:addBookmark()">Bookmark this Page</a> Code (markup): Set As Homepage Script: <a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://forums.digitalpoint.com/showthread.php?p=2428165');">Click here to set this page as homepage</a> Code (markup):