Skip to main content

Posts

How to read RSS feed using Javascript and Diplay it on Web page?

Use the following script to read and display the RSS feed content on your web-page using Javascript <script language="JavaScript" src="http://feed2js.org//feed2js.php?src=YOU_RSS_FEED_URL&chan=y&date=y&utf=y&html=a" charset="UTF-8" type="text/javascript"></script> <noscript> <a href="http://feed2js.org//feed2js.php?src=YOU_RSS_FEED_URL&chan=y&date=y&utf=y&html=y">View RSS feed</a> </noscript> > Substitute  YOUR_RSS_FEED_URL    with the Source URL of your rss feed There is a  tool that will help you to format a feed's display with the information you want to use on your web site. All you need to enter is the URL for the RSS source, and select the desired options . Read More about RSS Feed reader using JSfrom following site: http://feed2js.org/index.php?s=build

How to add labels on top of blogger posts

How to add labels or tags on top of blogger posts To add label on top of Your blogger posts do the following steps: Step1: Click on the edit template option Step2: Go to edit HTML and check the expand widget option Step3: find for the following code in the template source code <b:include data='post' name='post'/> Step4: copy and paste the following code snippet just above the above mentioned code <!--tag code start--> <font style='background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOpC8yOrY21T1lRens7ILlz1_rgSM6H6qBDqDYVQIJPfRkyv1Vd77I6zPBYK1b1jKPdU5C58N1MZloYBe3FiR_4mxMBPoSTQtrVT0mRTNjbS3bqq82VyvKdNaxkDI_8NfttrU2jJ8qNs0/s1600/icon_tags.png) no-repeat scroll top left;padding-left:25px;font-size:14px;font-weight:bold'> <b:if cond='data:post.labels'> <b:loop values='data:post.labels' var='label'><a expr:href='data:label.url + "?max-results=8...

Php script for Listing files based on last modified time

Php script for Listing files based on last modified time Here is the php script to list the files in a folder based on the modified date Using the below script you can list files from older to latest or latest to oldest <?php // list from a given folder $folder="test/"; $files = glob ( $folder."*.*" ); // to avoid hidden files // Sort files by modified time, latest to oldest array_multisort (array_map( 'filemtime', $files ),SORT_NUMERIC,SORT_DESC,$files); // Use SORT_ASC in place of SORT_DESC for oldest to latest //array_multisort( array_map ( 'filemtime', $files ),SORT_NUMERIC,SORT_ASC,$files); // display the file names if(count($files)){ for( $i=0 ; $i < count($files) ; $i++ ){ echo(basename($files[$i])."   <a href='".$folder.$files[$i]."'>Link to the file</a><br>"); } } ?>

Simple Slider show using Javascript - JS Slide show script

Simple Slider show using Javascript The following script will populate the slider container control with the contents in the slider content js array in regular interval of time. Here You can pause the slider on mouse over and later resume the slider on mouseout events. Sample Javascript code is given below: Save the following script as  slider.js //--------- CODE STARTS ------- var mbSlider=new Array(); arrSlide[0]= 'HTML Content in Slide1'; arrSlide[1]= 'HTML Content in Slide2'; var slide_count=arrSlide.length; var slide_ind=0; var slide_speed=5000; var slide_int; //function to fill slide content to the slider ctrl function displaySlide( ){  if( slide_ind == slide_count || slide_ind < 0 )   slide_ind=0; document.getElementById('slide_contents').innerHTML=arrSlide[slide_ind]; slide_ind ++; } //function to pause slide show function pauseSlide(){ clearInterval(slide_int); } //function to continue slide show function runSl...

How to access favicon from a remote server with out hot linking?

Showing favicon from a remote server on Your website with out hot linking As you know Hot linking is a crime of stealing bandwidth of one's server. Knowingly or unknowingly people may be doing this with out the knowledge that ,it is a CRIME. Site owner of the website from where you have linked an image is actually paying for displaying THEIR image on YOUR website as this process consumes a significant amount of bandwidth. To learn more about what is Bandwidth Stealing / Direct linking / Hot linking, please CLICK HERE . With out directly linking a favicon of another site, you can you the google indexed images. To access the favicon of a particular website, you can view it by taking the below given link. Replace "REQUIRED_DOMAIN" with a valid domain name http://www.google.com/s2/favicons?domain=REQUIRED_DOMAIN How it works: Example: http://www.google.com/s2/favicons?domain=example.com In the HTML code place the below given tag to detch the favicon of naother site...

How to check remote file or image exists

Php scripts to check remote file exists. Check files in same server To check a file in the same server use file_exists(), this doesn't support remote files file_exists — Checks whether a file or directory exists example : <?php if( file_exists("lib/class.php") ) echo "file present"; else echo "file not found "; ?> The limitation of file_exists() is , it doesn't support remote files. To check for remote file you can use any of the following: #|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#| Check Remote Image If you are checking for an image, You can use function getimagesize() Unlike file_exists, this built-in function supports remote files. It will return an array that contains the image information (width, height, type..etc). So check the returned array to confirm the presense of image <?php $arrImg = getimagesize("http://www.remoteserver.com/img.jpg"); if($arrImg[0]) { echo "Imag...


Urgent Openings for PHP trainees, Andriod / IOS developers and PHP developers in Kochi Trivandrum Calicut and Bangalore. Please Send Your updated resumes to recruit.vo@gmail.com   Read more »
Member
Search This Blog