Category Archives: Uncategorized

HTML frame to cloak URL

This is HTML frame code to cloak URL. Be careful when use it on affiliate program. Some program (like clickbank) don’t allow URL cloak with this method.

1
2
3
4
5
6
7
8
<html><head>
<title>example title</title>
</head>
<frameset border=0 rows="100%,*" frameborder="no">
<frame src="http://www.example.com" frameborder="no" border=0 noresize>
<frame topmargin="0" marginwidth="0" scrolling="no" marginheight="0" frameborder="no" border="0" noresize>
</frameset>
</html>

Facebook Connect integration in simple way

To implement Facebook Connect. First make sure to create the application profile inside Facebook Developer because we will need the API key for our site later on. Complete it and copy the generated API key.

Facebook Connect implementation in web consists of two parts; which it was on header and footer. As for header, you’ll need to insert these two lines of codes.

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>

And for footer, apply this code

<script type="text/javascript">
 
    FB.init("API KEY HERE", "xd_receiver.htm");
 
    FB.ensureInit(function() {
 
        if(FB.Connect.get_loggedInUser() != null){
 
            var param = {action: "facebooklogin", uid: FB.Connect.get_loggedInUser()};
 
            // ajax request for login
            $.post("func.ajax.php",param,function(data){
 
                //if true redirect else register
 
                if(data == "true"){
 
                    //window.location="home.php";
 
                    location.reload();
 
                }else if(data == "false"){
 
                    window.location="registerfb.php";
 
                }else{
 
                    alert("Technical Error.");
 
                }
 
            });
 
        }
 
    });
 
</script>