Search Google

Tuesday 3 March 2015

Best php project and code

Best php code http://sourcecodemania.com/category/php-programming/

https://www.google.co.in/search?q=php+project 
https://www.google.co.in/search?q=site:blogspot.com+php 
https://www.google.co.in/search?q=site:blogspot.com+php+project


http://www.phptpoint.com/projects/

http://www.phpkode.com/projects/

http://www.downscripts.com/down-php-scripts/

http://www.opensourcecms.com/

http://1000projects.org/php-projects.html
http://www.projectideasblog.com/2008/09/php-projects.html
https://github.com/search?p=2&q=php&type=Repositories&utf8=%E2%9C%93

http://www.smarttutorials.net/invoice-system-using-jquery-autocomplete/

Attendance Management System



Php Projects for Students Free Download with Source Code

Project Name Technology Download
Mailing Server Html, css, javascript, php, mysql Download
Online Examination Html, css, javascript, php, mysql Download
Facebook Html, css, javascript, php, mysql Download
Hostel Management System Html, css, javascript, php, mysql Download
Mailing server Html, css, javascript,php(filesytem) Download


PHP OPEN SOURCE PROPJECT
http://sourcecodemania.com/top-3-open-source-voice-broadcasting-softwares/

Download php Project Source Code


1. ICTDialer

ICTDialer is very promising open source voice broadcasting platform. ICTDialer is developed over Drupal and Freeswitch based powerful Plivo Communication Framework . It can be scaled to blast thousands of simultaneous calls using either VoIP, Foip or PSTN. ICTDialer capable to fit in many broadcasting and telemarketing scenarios. ICTDialer is developed and maintained by ICTInnovations.

2. Newfies Dialer

Newfies-Dialer is a voice broadcast application designed and built to automate the delivery of interactive phone calls to contacts, clients and the general public. A Newfies-Dialer Voice Broadcasting Platform is assembled entirely from free and open source components including FreeswitchDjango,  PlivoCelery and RabbitMQ. Newfies Dialer is developed and maintained by Star2Billing.

3. Vicidial

https://bitnami.com/ php open source 

 

Create Beautiful Fullscreen Scrolling Websites using pagePiling.js


In today's web design and development world, continuous changes and improvements are being made to make the web experience better and better. In this process, the role of JavaScript and jQuery plugins is very important. In this tutorial we'll be learning one of the same jQuery plugin called "pagePiling.js" to create a scrolling pile of sections for your website.


Before jumping into the steps of creating a Fullscreen Scrolling webpage with pagePiling.js, why don’t we have a look at what pagePiling.js really is?

Created By : alvarotrigo

Demo | Download
http://alvarotrigo.com/pagePiling/

 

How to Export MySQL Data into CSV or Excel Format

How to Export MySQL Data into CSV Format



Writing this post after so many days due to busy schedule.A most popular post on "How to Import CSV file Data into Mysql Using PHP" has already been written.


Now we'll learn totally opposite procedure of that tutorial.In this tutorial you will see how to export MySQL Data into CSV or Excel Format.Its just a single script and very easy to understand.
Logic of Script
-- Establish Connection
-- Select your Database
-- Fetching Data from the table
-- Get total no. of the fields using mysql_num_fields
-- Get the names of the fields through the loop using mysql_field_name
-- The header() function sends a raw HTTP header to a client.To know more about the options please refer below links
 http://www.php.net/manual/en/function.header.php
 http://www.w3schools.com/Php/func_http_header.asp

Script File index.php

<?php
//database connection details
$connect = mysql_connect('localhost','root','');
//your database name
mysql_select_db('test',$connect);
//selecting records from the table
$query = "SELECT * FROM csvtbl limit 50";
$header = '';
$data ='';
$export = mysql_query ($query ) or die ( "Sql error : " . mysql_error( ) );
$fields = mysql_num_fields ( $export );
for ( $i = 0; $i < $fields; $i++ )
{
    $header .= mysql_field_name( $export , $i ) . "\t";
}
while( $row = mysql_fetch_row( $export ) )
{
    $line = '';
    foreach( $row as $value )
    {                                            
        if ( ( !isset( $value ) ) || ( $value == "" ) )
        {
            $value = "\t";
        }
        else
        {
            $value = str_replace( '"' , '""' , $value );
            $value = '"' . $value . '"' . "\t";
        }
        $line .= $value;
    }
    $data .= trim( $line ) . "\n";
}
$data = str_replace( "\r" , "" , $data );
if ( $data == "" )
{
    $data = "\nNo Record(s) Found!\n";                        
}
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=Export.xls");
header("Pragma: no-cache");
header("Expires: 0");
print "$header\n$data";
?>
Thats it..!! and so simple tutorial ends here :)


............................................
The form will look like this:
php script to send mail with attachment
HTML form for Sending Email with File Attachment in PHP.
Please note that we have added:
“enctype=”multipart/form-data”
while defining the <form> tag. This is to tell the browser that this form will be used to upload files. Then we have added the “name” and “email” fields to collect the user info. The third form field is the file upload box.
<input type=”file” name=”image”>
On hitting the “Submit” button, the form data along with the file data is posted to the script pointed to by the ‘action’ attribute of the form.
php script to send mail with attachment
Download
Now we almost finished form designing part.
Now just follow php part coding. I am using php mail plugin to send an email with attachment.
Step 1:
Create mail.php file and add the following php file (class.phpmailer.php).
require 'class.phpmailer.php';
Step 2:
Now add to email ID.
$to = "Your email ID";
$mail->AddAddress($to);
Step 3:
Now get from email id and name of the user.
$mail->From = $_POST['femail'];
$mail->FromName = $_POST['name'];
Step 4:
Now add subject of the mail.
$mail->Subject = "Test Email using PHP";
Step 5:
Now get message from the html form.
$body = “<table>
<tr>
<th colspan=’2′>This Sample Mail</th>
</tr>
<tr>
<td>Name :</td>
<td>”.$_POST[‘name’].”</td>
</tr>
<tr>
<td>E-mail : </td>
<td>”.$_POST[‘email’].”</td>
</tr>
<tr>
<td>Phone : </td>
<td>”.$_POST[‘phone’].”</td>
</tr>
<tr> <td>Message : </td> <td>”.$_POST[‘message’].”</td> </tr> <table>”;
$body = preg_replace(‘/\\\\/’,”, $body); //Strip backslashes
$mail->MsgHTML($body);
Step 6:
Finally get the attachment and send it.
    $mail->AddAttachment($_FILES['image']['tmp_name'],
    $_FILES['image']['name']);

    $mail->IsHTML(true); // send as HTML

    $mail->Send();
    echo 'Message has been sent.';
Here is the full php source code.
<?php
/**
* Simple example script using PHPMailer with exceptions enabled
* @package phpmailer
* @version $Id$
*/
require ‘class.phpmailer.php';
try {
$mail = new PHPMailer(true); //New instance, with exceptions enabled
$to = $_POST[‘email’];
$mail->AddAddress($to);
$mail->From = $_POST[‘femail’];
$mail->FromName = $_POST[‘name’];
$mail->Subject = “Test Email using PHP”;
$body = “<table>
<tr>
<th colspan=’2′>This Sample Mail</th>
</tr>
<tr>
<td style=’font-weight:bold’>Name :</td>
<td>”.$_POST[‘name’].”</td>
</tr>
<tr>
<td style=’font-weight:bold’>E-mail : </td>
<td>”.$_POST[‘email’].”</td>
</tr>
<tr>
<td style=’font-weight:bold’>Phone : </td>
<td>”.$_POST[‘phone’].”</td>
</tr>
<tr>
<td style=’font-weight:bold’>Message : </td>
<td>”.$_POST[‘message’].”</td>
</tr>
<table>”;
$body = preg_replace(‘/\\\\/’,”, $body); //Strip backslashes
$mail->MsgHTML($body);
$mail->IsSMTP(); // tell the class to use SMTP
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Port = 25; // set the SMTP server port
//$mail->Host = “mail.yourdomain.com”; // SMTP server
//$mail->Username = “name@domain.com”; // SMTP server username
//$mail->Password = “password”; // SMTP server password
$mail->IsSendmail(); // tell the class to use Sendmail
$mail->AddReplyTo(“admin@smarttutorials.net”);
$mail->AltBody = “To view the message, please use an HTML compatible email viewer!”; // optional, comment out and test
$mail->WordWrap = 80; // set word wrap
$mail->AddAttachment($_FILES[‘image’][‘tmp_name’],
$_FILES[‘image’][‘name’]);
$mail->IsHTML(true); // send as HTML
$mail->Send();
echo ‘Message has been sent.';
} catch (phpmailerException $e) {
echo $e->errorMessage();
}
?>
Hope this code works well for all for sending all type of files (word files,PDF files and images etc………..)

php script to send mail with attachment
Example Php Email with File attachment and Images

No comments:

Post a Comment