Saturday, October 11, 2008
//EXAMPLE.PHP
/*
*/
include("receivemail.class.php");
// Create Object For reciveMail Class
$obj= new receiveMail('mygmailusername',mygmailaccountpasswd,'mygmailemailaddress','pop.gmail.com','pop3','110');
//Connect to the Mail Box
$obj->connect();
// Get Total Number of Unread Email in mail box
$tot=$obj->getTotalMails(); //Total Mails in Inbox Return integer value
echo "Total Mails:: $tot
";
for($i=1;$i<=$tot;$i++)
{
$head=$obj->getHeaders($i); // Get Header Info Return Array Of Headers **Key Are (subject,to,toOth,toNameOth,from,fromName)
echo "Subjects :: ".$head['subject']."
";
echo "TO :: ".$head['to']."
";
echo "To Other :: ".$head['toOth']."
";
echo "ToName Other :: ".$head['toNameOth']."
";
echo "From :: ".$head['from']."
";
echo "FromName :: ".$head['fromName']."
";
echo "
";
echo "
*******************************************************************************************
";
echo $obj->getBody($i); // Get Body Of Mail number Return String Get Mail id in interger
$str=$obj->GetAttech($i,"./"); // Get attached File from Mail Return name of file in comma separated string args. (mailid, Path to store file)
$ar=explode(",",$str);
foreach($ar as $key=>$value)
echo ($value=="")?"":"Atteched File :: ".$value."
";
echo "
------------------------------------------------------------------------------------------
";
//$obj->deleteMails($i); // Delete Mail from Mail box
}
$obj->close_mailbox(); //Close Mail Box
?>
//ReciiveMail.class.php
// Main ReciveMail Class File - Version 1.0 (01-03-2006)
/*
* File: recivemail.class.php
* Description: Reciving mail With Attechment
*/
class receiveMail
{
var $server='';
var $username='';
var $password='';
var $marubox='';
var $email='';
function receiveMail($username,$password,$EmailAddress,$mailserver='localhost',$servertype='imap',$port='143') //Constructure
{
if($servertype=='imap')
{
if($port=='') $port='143';
$strConnect='{'.$mailserver.':'.$port. '}INBOX';
}
else
{
//$strConnect='{'.$mailserver.':'.$port. '/pop3}INBOX';
$server ='{'.$post['server'].'/notls/imap4}INBOX';
//$server="{".$post['server'].":110/pop3/notls}INBOX";
}
$this->server = $strConnect;
$this->username = $username;
$this->password = $password;
$this->email = $EmailAddress;
}
function connect() //Connect To the Mail Box
{
$this->marubox=imap_open($this->server,$this->username,$this->password);
}
function getHeaders($mid) // Get Header info
{
$mail_header=imap_header($this->marubox,$mid);
$sender=$mail_header->from[0];
$sender_replyto=$mail_header->reply_to[0];
if(strtolower($sender->mailbox)!='mailer-daemon' && strtolower($sender->mailbox)!='postmaster')
{
$mail_details=array(
'from'=>strtolower($sender->mailbox).'@'.$sender->host,
'fromName'=>$sender->personal,
'toOth'=>strtolower($sender_replyto->mailbox).'@'.$sender_replyto->host,
'toNameOth'=>$sender_replyto->personal,
'subject'=>$mail_header->subject,
'to'=>strtolower($mail_header->toaddress)
);
}
return $mail_details;
}
function get_mime_type(&$structure) //Get Mime type Internal Private Use
{
$primary_mime_type = array("TEXT", "MULTIPART", "MESSAGE", "APPLICATION", "AUDIO", "IMAGE", "VIDEO", "OTHER");
if($structure->subtype) {
return $primary_mime_type[(int) $structure->type] . '/' . $structure->subtype;
}
return "TEXT/PLAIN";
}
function get_part($stream, $msg_number, $mime_type, $structure = false, $part_number = false) //Get Part Of Message Internal Private Use
{
if(!$structure) {
$structure = imap_fetchstructure($stream, $msg_number);
}
if($structure) {
if($mime_type == $this->get_mime_type($structure))
{
if(!$part_number)
{
$part_number = "1";
}
$text = imap_fetchbody($stream, $msg_number, $part_number);
if($structure->encoding == 3)
{
return imap_base64($text);
}
else if($structure->encoding == 4)
{
return imap_qprint($text);
}
else
{
return $text;
}
}
if($structure->type == 1) /* multipart */
{
while(list($index, $sub_structure) = each($structure->parts))
{
if($part_number)
{
$prefix = $part_number . '.';
}
$data = $this->get_part($stream, $msg_number, $mime_type, $sub_structure, $prefix . ($index + 1));
if($data)
{
return $data;
}
}
}
}
return false;
}
function getTotalMails() //Get Total Number off Unread Email In Mailbox
{
$headers=imap_headers($this->marubox);
return count($headers);
}
function GetAttech($mid,$path) // Get Atteced File from Mail
{
$struckture = imap_fetchstructure($this->marubox,$mid);
$ar="";
foreach($struckture->parts as $key => $value)
{
$enc=$struckture->parts[$key]->encoding;
if($struckture->parts[$key]->ifdparameters)
{
$name=$struckture->parts[$key]->dparameters[0]->value;
$message = imap_fetchbody($this->marubox,$mid,$key+1);
if ($enc == 0)
$message = imap_8bit($message);
if ($enc == 1)
$message = imap_8bit ($message);
if ($enc == 2)
$message = imap_binary ($message);
if ($enc == 3)
$message = imap_base64 ($message);
if ($enc == 4)
$message = quoted_printable_decode($message);
if ($enc == 5)
$message = $message;
$fp=fopen($path.$name,"w");
fwrite($fp,$message);
fclose($fp);
$ar=$ar.$name.",";
}
}
$ar=substr($ar,0,(strlen($ar)-1));
return $ar;
}
function getBody($mid) // Get Message Body
{
$body = $this->get_part($this->marubox, $mid, "TEXT/HTML");
if ($body == "")
$body = $this->get_part($this->marubox, $mid, "TEXT/PLAIN");
if ($body == "") {
return "";
}
return $body;
}
function deleteMails($mid) // Delete That Mail
{
imap_delete($this->marubox,$mid);
}
function close_mailbox() //Close Mail Box
{
imap_close($this->marubox,CL_EXPUNGE);
}
}
?>
Friday, September 19, 2008
Large Hadron CollideThe Large Hadron Collider (LHC), a 27 kilometer (17 mile) long particle accelerator straddling the border of Switzerr nearly ready




















The Large Hadron Collider (LHC), a 27 kilometer (17 mile) long particle accelerator straddling the border of Switzerland and France, is nearly set to begin its first particle beam tests. The European Organization for Nuclear Research (CERN) is preparing for its first small tests in early August, leading to a planned full-track test in September - and the first planned particle collisions before the end of the year. The final step before starting is the chilling of the entire collider to -271.25 C (-456.25 F). Here is a collection of photographs from CERN, showing various stages of completion of the LHC and several of its larger experiments (some over seven stories tall), over the past several years.
Latest News from the LHC

Successful start up for LHC on 10th September 2008 .
The first proton beams were injected into the LHC on the 10th September. This critical step in commissioning the LHC went smoothly and over the next few months the LHC team will move towards the first particle collisions (more...).
This major milestone in the LHC project was be covered live by international broadcasters. UK media organisations were at CERN and at a simultaneous media event in London.
BBC Radio 4 devoted a day of programming to the LHC, including covering first injection of beams live on the Today programme. See the BBC website for programming, background etc.
Press Release announcing start up date.
Dr Tara Shears talks about some of the scientific questions that the LHC project will help us answer, on the www.labreporter.com website.
You can try your hand at running the LHC and interpreting collisions on our simulator at www.particledetectives.net.
The extensive preparations for the start of LHC experiments have included exhaustive safety assessments, including the potential risk of creating new particles, black holes etc. The latest risk assessment is available here.
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
Hydrotherapy - Benefits of Hydrotherapy, Treatments with Water
Water is regarded as one of the ---precious gifts of nature. It is an essential and major component of all living beings an earth. It is not a food but –the nutrients to all parts of the body. Versatility is its most important property. It can be used effectively both inside and outside the body.
It is the largest constituent of human body. It is essential to the composition of body for the p-----functioning of the different body processes. It helps in the proper absorption of food materials by the intestinal tract. It keeps blood in a liquid state providing good circulation even to the smallest blood vessels. It maintains body temperature and helps the kidneys to ---unwanted body waste in the form of urine.
Besides an important nutrient of the body water applications are used in the treatment of variety of ailments.
Typical treatments may include contract bathing using alternating baths of hot and cold water. Bathing is very necessary because invisible perspiration carries various substances with it and when the water ---the poisonous substances remain on the skins surface cold water or water at body temperature should be used for bathing. The application of the cold water followed by friction ----- flow of blood to the skin. The provides the skin with its necessary excessive and keeps it healthy.
Other forms of treatment may include hot or cold body wraps, friction substance or baths with various ingredients like used baths.
Cold body ---are taken by seeking a sheet in cold water and wrapping it around the body and then covering the body with blanket and dry sheet. There wraps are used for chronic muscle strains and backache. In the cold wraps cold is quickly replaced by warmth.
The ---baths in which you immense yourself up to the pelvis in hot or cold water is the best for -----. They are used or after recommended for conditions such as chronic constipation, congestion is the public area, menstrual cramps, vaginal irritations and anal fissures cols –baths also help to ----the muscle tone in the pelvis which helps to decree the problems with incontinence.
Cold friction sub is an effective way help alleviate chronic fatigue syndrome. It can also increase circulation to help in the healing of bronchitis and pneumonia. In cold friction sub take a hot shower or bath first, then dip a clear cloth in cold water, and wrap it around hand. In a circulation motion, sub your other---, hand, leg and foot with that cloth and in the same manner repeat the same with the other side.
Neutral baths are used to reliance menopausal hot flashes, insomnia, rheumatoid arthritis and emotional agitation. In this bath immense yourself till neck in water that is few degrees than your natural body temperature for about 20 minutes.
Steam inhalation is a very common treatment for common colds and flu; it breaks up stuffiness and cases your breathing passage.
For steam inhalation brings water to basil in a pot and the point the water is still steaming cover your head till neck with a towel or any cloth and inhale the vapors.
Whirlpool baths soothes every day stresses and strains. It also rehabilitates injured muscles and joints. They are also best suited to increase the circulation of blood in injured patients. These baths are found in locker rooms.
Hot and cold compress: Hot compresses applied about one and half hour to the lower back and legs are best suited for the treatment of sciatica.
Moist and hot compress on the ----------can provide relief from painful menstrual cramps and also stimulates the immune system.
Cold compress helps to bring down to various inflammations and also relieves from several------and pains. Cold compresses shouted be taken for just 20 minutes as the more of its may damage the skin.
Colon irrigation is a process that flushes the impurities from your system. The best known form is enema that relieves the person from constipation. It should be preformed by experienced Hyde -herapist only.
Cold water treading is highly beneficial to increase immunity. In this treading take a shower or bath and after that immense your feet in cold water and walk in cold water for few minutes. After that sub your feet with a towel.
All these water treatments are very simple and can be performed at home easily. But some of the applications are not recommended for pregnant women, patients of diabetes and heart problems. So, it’s better to acquire full knowledge from an experienced therapist before starting any treatment