Skip to main content

Posts

Showing posts with the label php

How to Add Facebook Like button to your website

The below script adds Facebook Like button to your website despite the scripting language used, so it works with coldfusion, php, jsp, ruby on rails, etc. This implementation is based on Graph API. Also the code below can be used to add Facebook Like Button to wordpress and blogger blogs. The settings in red can be customized to fit with your website, the code is below: <iframe  src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2F www.yourwebsite.com %2F&amp; layout=standard&amp;   show_faces=true &amp;   width=230 &amp; action=like&amp; colorscheme=light&amp; height=95 "  scrolling="no"  frameborder="0" s tyle="border:none;  overflow:hidden;  width:230 px;   height:95 px;"  allowtransparency="true"> </iframe> replace www.yourwebsite to your website address. showfaces is set to true if you want the faces of the people who pressed on like button to appear on the like widget, else set...

How to redirect web URL in PHP, Coldfusion and HTML

web page redirection is very common in web development, so for instance if some tried to access a paged without a valid authenticated session he will be redirected to a login page. Also if you move your site from a place to another you need to redirect traffic that goes to the old one to move to the new one. How to redirect to another URL? In coldfusion: In coldfusion you have to use the following tag, please change the url in the cfset below to the URL you want to redirect the traffic to: <cfset url="http://blog.abusalah.info"> <cflocation url="#url#"> In PHP see the code below, please note to change the URL to the url you want to redirect to: <?php $URL="http://blog.abusalah.info"; header("Location: $URL"); ?> In both Coldfusion and PHP when the redirection code is found the page will stop processing and will redirect the traffic. So if the tags are on the top of the page the anyother code in the page will be ignored, but if t...