Find number of weekdays (Mon, Tues etc) between two dates

We have 0 comments on this post.

<?php function workingDays( $fromDate, $interval )  { $date_array = explode(‘-’, $fromDate ); $day         = $date_array[0]; $month         = $date_array[1]; $year         = $date_array[2]; $working_date = array(); for ( $i = 1;  $i <= $interval; $i++ )               { $working_date[] = date(“l”, mktime(0, 0, 0,$month,$day +(int)$i,$year)); } return $working_date; } $getDays = workingDays(’30-11-2011′, [...]

 

Overcome XSS scripting or cross site scripting

We have 0 comments on this post.

Just paste this code in a header file which is included in the site. You can exclude the fields like description while filtering the POST And GET. foreach ($_GET as $key => $value) { $_GET[$key] = strip_tags($value); } foreach ($_POST as $key => $value) { $_POST[$key] = strip_tags($value); } foreach ($_SERVER as $key => $value) [...]

 

Facebook Connect in Php

We have 0 comments on this post.

Facebook Connect in PHP,Just Follow these Steps :- Upload all the files of zip folder on server.(Attached with this post) Step 1 :  Just open the file where you have to use facebook connect.(e.g abc.php) Step 2:  Just include this javascript file in head :- “<script src=”http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php” type=”text/javascript”></script>”. Step 3:  Include the file “facebook.php”(Uploaded with [...]

Tags: , ,

 

PHP script – how to find the working days from a specified date?

We have 0 comments on this post.

<?php /* This is a function to find out working days from a specified date and  format of date must be dd-mm-yyyy First parameter to function is the date from which working days are to be calculated (working day exclude Sun and Sat) Second parameter to function is the number of working days to be [...]

Tags: , , , ,

 

How to convert HTML to PDF using PHP 5

We have 0 comments on this post.

There are many tools on the internet that allow you to convert files of various formats to PDF – but sometimes you need to make such conversions using your code. In this article, we’ll specifically discuss how to convert an HTML file or content to a PDF file using PHP 5. For the task at [...]

Tags: , ,

bottombar