PHP Script or Code to automatically bookmark the site

Discussion in 'PHP' started by JoseYe, Apr 1, 2008.

  1. #1
    Does anyone have any or knows of any? I would like to add that to my proxy.

    One so that the user clicks on the link and a Bookmark window prompts up. Thanks!
     
    JoseYe, Apr 1, 2008 IP
  2. J.T.D.

    J.T.D. Peon

    Messages:
    86
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    That would need javascript. Try searching google for:

    "javascript bookmark website"

    Sadly I'm not on my computer now, so I cant show you my bookmarking script.

    - JTD
     
    J.T.D., Apr 1, 2008 IP
  3. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
  4. J.T.D.

    J.T.D. Peon

    Messages:
    86
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Or you can use this:

    
    <script type="text/javascript">
    function bookmarksite(title,url) {
    if (window.sidebar) {
    	window.sidebar.addPanel(title, url, "");
    } else if(window.opera && window.print) {
    	var elem = document.createElement('a');
    	elem.setAttribute('href',url);
    	elem.setAttribute('title',title);
    	elem.setAttribute('rel','sidebar');
    	elem.click();
    } else if(document.all) {
    	window.external.AddFavorite(url, title);
    }
    </script>
    
    Code (markup):
    Then use this code to use it....
    
    <a href="#" onClick="javascript:bookmarksite('http://WEBSITE.ADDRESS','YOUR TITLE'); return false;">
    Bookmark Us!</a>
    
    Code (markup):
    Of to automatically bookmark your website on page load:
    
    <script type="text/javascript">
    	window.onload = bookmarksite('http://WEBSITE.ADDRESS','WEBSITE TITLE');
    </script>
    
    Code (markup):
    - JTD
     
    J.T.D., Apr 2, 2008 IP