opacity of div or body

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tokcy
    New Member
    • Sep 2008
    • 45

    opacity of div or body

    HI every one,
    i am using tooltip on click of link and i want like when that tooltip open then background window would be blure().
    can anyone help me...
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    PHP can't...

    --Moving to Javascript.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Use a div 100% in height/width which covers the content below while the tooltip is displayed.

      Comment

      • tokcy
        New Member
        • Sep 2008
        • 45

        #4
        contact fetching from HOTMAIL

        hi everyone i have some in fetching a contact from hotmail i did not know what is the problem i mean i have a lot of contacts in my live id but still showing there is not contact error! i am attaching the code please provide me solution i will be very gratefull to all of u...

        msn contact file :
        Code:
        <?php
        
        class msn
        {
        
        	var $server	=	'messenger.hotmail.com';
        	var $port	=	1863;
        
        	var $nexus	=	'https://nexus.passport.com/rdr/pprdr.asp';
        	var $ssh_login	=	'login.live.com/login2.srf';
        
        	var $debug	=	0;
        
        
        	var $curl_bin	=	0;
        	var $curl	=	'/usr/local/bin/curl';	// linux
        	//var $curl	=	'c:\curl.exe';		// windows
        
            //Used to prevent the script from hanging
            var $count = 0;
            
            //Used to store the email addresses until all have been collected
            var $email_input = array();
            var $email_processing = array();
            var $email_output = array();
        
        	/**
        	 *
        	 * desc	:	Connect to MSN Messenger Network
        	 *
        	 * in	:	$passport	=	passport i.e: user@hotmail.com
        	 *		$password	=	password for passport
        	 *
        	 * out	:	true on success else return false
        	 *
        	 */
        
        	function connect($passport, $password)
        	{
        		$this->trID = 1;
        
        		if (!$this->fp = @fsockopen($this->server, $this->port, $errno, $errstr, 2)) {
                    
                    die("Could not connect to messenger service");
        		
        		} else {
        		      stream_set_timeout($this->fp, 2);
        		      
        			$this->_put("VER $this->trID MSNP9 CVR0\r\n");
        
        			while (! feof($this->fp))
        			{
        				$data = $this->_get();
        
        				switch ($code = substr($data, 0, 3))
        				{
        					default:
        						echo $this->_get_error($code);
        
        						return false;
        					break;
        					case 'VER':
        						$this->_put("CVR $this->trID 0x0409 win 4.10 i386 MSNMSGR 7.0.0816 MSMSGS $passport\r\n");
        					break;
        					case 'CVR':
        						$this->_put("USR $this->trID TWN I $passport\r\n");
        					break;
        					case 'XFR':
        						list(, , , $ip)  = explode (' ', $data);
        						list($ip, $port) = explode (':', $ip);
        
        						if ($this->fp = @fsockopen($ip, $port, $errno, $errstr, 2))
        						{
        							$this->trID = 1;
        
        							$this->_put("VER $this->trID MSNP9 CVR0\r\n");
        						}
        						else
        						{
        							if (! empty($this->debug)) echo 'Unable to connect to msn server (transfer)';
        
        							return false;
        						}
        					break;
        					case 'USR':
        						if (isset($this->authed))
        						{
        							return true;
        						}
        						else
        						{
        							$this->passport = $passport;
        							$this->password = urlencode($password);
        
        							list(,,,, $code) = explode(' ', trim($data));
        
        							if ($auth = $this->_ssl_auth($code))
        							{
        								$this->_put("USR $this->trID TWN S $auth\r\n");
        
        								$this->authed = 1;
        							}
        							else
        							{
        								if (! empty($this->debug)) echo 'auth failed';
        
        								return false;
        							}
        						}
        					break;
        				}
        			}
        		}
        		
        	}
        
            //Collects the raw data containing the email addresses
        	function rx_data()
        	{
        		$this->_put("SYN $this->trID 0\r\n");
        		
        		//Supplies the second MSG code which stops
        		//the script from hanging as it waits for
        		//more content
        		$this->_put("CHG $this->trID NLN\r\n");
                
                $stream_info = stream_get_meta_data($this->fp);
                $email_total = 100;
                //the count check prevents the script hanging as it waits for more content
        		while ((! feof($this->fp)) && (! $stream_info['timed_out']) && ($this->count <= 1) && (count($this->email_input) < $email_total))
        		{
        			$data = $this->_get();
        			$stream_info = stream_get_meta_data($this->fp);
        			
        			if ($data)
        			{
                        
        			    switch($code = substr($data, 0, 3))
        				{
        					default:
        						// uncommenting this line here would probably give a load of "error code not found" messages.
        						//echo $this->_get_error($code);
        					break;
        					case 'MSG':
        					   //This prevents the script hanging as it waits for more content
        					   $this->count++;
        					break;
        					case 'LST':
        					   //These are the email addresses
        					   //They need to be collected in email_input
        					   
        					   $this->email_input[] = $data;
        					   if ($this->debug) print("<span class='b'>" . count($this->email_input) . "</span>");
        					   
        					break;
        					case 'SYN':
        					$syn_explode = explode(" ", $data);
        					$email_total = $syn_explode[3];
        					break;
        					case 'CHL':
        						$bits = explode (' ', trim($data));
        
        						$return = md5($bits[2].'Q1P7W2E4J9R8U3S5');
        						$this->_put("QRY $this->trID msmsgs@msnmsgr.com 32\r\n$return");
        					break;
        					
        				}
        			}
        		}
        		
        	}
        	
        	//This function extracts the emails and screen names from the raw data 
        	//collected by rx_data
        	function process_emails () {
              
              //Neaten up the emails
              
              //$regex = "|^LST\s(\S+?)\s(\S+?)\s\d+?\s\d+?$|";
              foreach($this->email_input as $email_entry) {
                
                //Seperate out the email from the name and other data
                $this->email_processing[] = explode(" ", $email_entry);
                                
              }
              
              //Get rid of the unnecessary data and clean up the name
              foreach($this->email_processing as $email_entry){
                
                $this->email_output[] = array(0 => $email_entry['1'],
                                                1 => urldecode($email_entry[2]));
            }
            
            //var_dump($this->email_processing);
            //var_dump($this->email_output);
              
              
              
          }
        
            //This is a quick way of calling all the seperate functions
            //needed to grab the contact list
            function getAddressbook($username, $password) {
              
              //Connect to the MSNM service
              $this->connect($username, $password);
              
              //Get data
              $this->rx_data();
              
              //Process emails
              $this->process_emails();
              
              //send the email array
              return $this->email_output;
              
              
            }
        
        
        	/*====================================*\
        		Various private functions
        	\*====================================*/
        
        	function _ssl_auth($auth_string)
        	{
        		if (empty($this->ssh_login))
        		{
        			if ($this->curl_bin)
        			{
        				exec("$this->curl -m 60 -LkI $this->nexus", $header);
        				$header = implode($header, null);
        			}
        			else
        			{
        				$ch = curl_init($this->nexus);
        
        				curl_setopt($ch, CURLOPT_HEADER, 1);
        				curl_setopt($ch, CURLOPT_NOBODY, 1);
        				curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        				curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        				curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        				// curl_setopt($ch, CURLOPT_TIMEOUT, 2);
        
        				$header = curl_exec($ch);
        
        				curl_close($ch);
        			}
        
        			preg_match ('/DALogin=(.*?),/', $header, $out);
        
        			if (isset($out[1]))
        			{
        				$slogin = $out[1];
        			}
        			else
        			{
        				return false;
        			}
        		}
        		else
        		{
        			$slogin = $this->ssh_login;
        		}
        
        
        		if ($this->curl_bin)
        		{
        			$header1 = '"Authorization: Passport1.4 OrgVerb=GET,OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom,sign-in='.$this->passport.',pwd='.$this->password.','.$auth_string.'"';
        
        			exec("$this->curl -m 60 -LkI -H $header1 https://$slogin", $auth_string);
        
        			$header = null;
        
        			foreach ($auth_string as $key => $value)
        			{
        				if (strstr($value, 'Unauthorized'))
        				{
        					echo 'Unauthorised';
        					return false;
        				}
        				elseif (strstr($value, 'Authentication-Info'))
        				{
        					$header = $value;
        				}
        			}
        		}
        		else
        		{
        			$ch = curl_init('https://'.$slogin);
        			curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        							'Authorization: Passport1.4 OrgVerb=GET,OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom,sign-in='.$this->passport.',pwd='.$this->password.','.$auth_string,
        							'Host: login.passport.com'
        							));
        
        			curl_setopt($ch, CURLOPT_HEADER, 1);
        			curl_setopt($ch, CURLOPT_NOBODY, 1);
        			curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        			// curl_setopt($ch, CURLOPT_TIMEOUT, 2);
        
        			$header = curl_exec($ch);
        
        			curl_close($ch);
        		}
        
        		preg_match ("/from-PP='(.*?)'/", $header, $out);
        
        		return (isset($out[1])) ? $out[1] : false;
        	}
        
        
        	function _get()
        	{
        		if ($data = @fgets($this->fp, 4096))
        		{
        		      
        		  
        			if ($this->debug) echo "<div class=\"r\">&lt;&lt;&lt; $data</div>\n";
        
        			return $data;
        		}
        		else
        		{
        			return false;
        		}
        	}
        
        
        	function _put($data)
        	{
        		fwrite($this->fp, $data);
        
        		$this->trID++;
        
        		if ($this->debug) echo "<div class=\"g\">&gt;&gt;&gt; $data</div>";
        	}
        
        
        	function _get_error($code)
        	{
        		switch ($code)
        		{
        			case 201:
        				return 'Error: 201 Invalid parameter';
        			break;
        			case 217:
        				return 'Error: 217 Principal not on-line';
        			break;
        			case 500:
        				return 'Error: 500 Internal server error';
        			break;
        			case 540:
        				return 'Error: 540 Challenge response failed';
        			break;
        			case 601:
        				return 'Error: 601 Server is unavailable';
        			break;
        			case 710:
        				return 'Error: 710 Bad CVR parameters sent';
        			break;
        			case 713:
        				return 'Error: 713 Calling too rapidly';
        			break;
        			case 731:
        				return 'Error: 731 Not expected';
        			break;
        			case 800:
        				return 'Error: 800 Changing too rapidly';
        			break;
        			case 910:
        			case 921:
        				return 'Error: 910/921 Server too busy';
        			break;
        			case 911:
        				return 'Error: 911 Authentication failed';
        			break;
        			case 923:
        				return 'Error: 923 Kids Passport without parental consent';
        			break;
        			case 928:
        				return 'Error: 928 Bad ticket';
        			break;
        			default:
        				return 'Error code '.$code.' not found';
        			break;
        		}
        	}
        }
        ?>
        and index file is:

        Code:
        <?php
        
        
        	ob_start();
        	set_time_limit(0);
        	$dir = 'csvUpload';
        	$dp = opendir($dir) or die ('Fatal Error: ');
        	while ($file = readdir($dp)) 
        	{
        		if ((eregi('.csv',$file)) && (filemtime($dir."/".$file)) < (strtotime('yesterday'))) 
        		{
        			$del=@unlink($dir."/".$file);
        		}
        	}
        	if(isset($_POST['domain']) && !empty($_POST['domain']))
        	{
        		$usrdomain 	= $_POST['domain'];
        	}
        	?>
        	<html>
        	<head>
        	<title>Contact Grabber</title>
        	<style>
        	body,td,div,select,a
        	{
        		#font-family:arial,sans-serif;
        		#font-size:13px;
        		
        		font-family:Verdana, Arial, Helvetica, sans-serif;
        		font-size:13px;
        		color:#765E1B;
        		#padding:35px 50px 0px 50px ;
        	}
        	.style1 {color: #0000FF}
            .style3 {color: #0000FF; font-weight: bold; }
            .style4 {color: #FF0000}
            </style>
        	<script language="javascript">
        	function checkEmpty(frm)
        	{
        		if (frm.username.value == "" || frm.password.value == "")
        		{
        			alert("Please enter username & password.");
        			frm.username.focus();
        			return false;
        		}
        		return true;
        	}
        	</script>
        <script type="text/javascript">
        	function checkUncheckAll(theElement)
        	 {
             var theForm = theElement.form, z = 0;
        	 for(z=0; z<theForm.length;z++)
        	 {
              if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall')
        	  {
        	  theForm[z].checked = theElement.checked;
        	  }
        	 }
        	}  
        </script>
        	
        	</head>
        	<body onLoad="document.loginForm.username.focus();">
        	<form action="index.php" method="POST" onSubmit="return checkEmpty(this);" name="loginForm">
        	<table width="490" border="0" align="center" cellpadding="2" cellspacing="0" bordercolor="#0000FF" bgcolor="#42AACC">
        	  <tr>
        	  	<td width="117"><div align="center"><span class="style3">Username</span></></div></td>
        	  	<td width="174"><input type="text" name="username" value="<?php echo @$_POST['username']; ?>" size="29" /></td>
        	    <td width="187">	
        	      <select name="domain" size="1">
        			<option value="gmail.com" <?php if ($usrdomain=="gmail.com") echo selected; ?>>@gmail.com</option>
        			<option value="live.com" <?php if ($usrdomain=="live.com") echo selected; ?>>@live.com</option>
        			<option value="rediffmail.com" <?php if ($usrdomain=="rediffmail.com") echo selected; ?>>@rediffmail.com</option>		
        			<option value="yahoo.com" <?php if ($usrdomain=="yahoo.com") echo selected; ?>>@yahoo.com</option>
        		  </select>        </td>
        	  </tr>
        	  <tr>
        	  	  <td class="style3">Password</td>
        	      <td colspan="2"><input name="password" type="password" class="style3" size="25"/></td>
        	  </tr>
        	  <tr>
          	    <td align="center"><span class="style1"></span></div></td>
        	    <td align="center"><input name="submit" type="submit" class="style3" value="Fetch My Contacts" /></td>
        	    <td align="center">&nbsp;</td>
        	  </tr>    
        	</table>
        	</form>
        	</body>
        	</html>
        	
        	<?php
        	if(isset($_POST['submit']) && !empty($_POST['submit'])) 
        	{
        		if(!extension_loaded(curl))
        		{
        			die('<p align="center"><font color="#FF0000">Curl is not installed on your server, Please contact to your server administrator.</font></p>');
        		}	
        	
        		$YOUR_EMAIL		 = $_POST['username'];
        		$YOUR_PASSWORD 	 = $_POST['password'];
        		
        		require("baseclass/baseclass.php");
        		if($usrdomain=="rediffmail.com")
        	    {
        		     require("rediff/grabRediff.class.php");
        			 $YOUR_EMAIL = $_POST['username']."@".$usrdomain;
        			 $obj = new rediff();
        			 //echo $YOUR_EMAIL;
                }
        	
        	    if($usrdomain=="gmail.com")
        	    {
        		     require("gmail/libgmailer.php");
        			 $YOUR_EMAIL = $_POST['username']."@".$usrdomain;
        			 $obj = new GMailer();
        	    }
        	
        		if($usrdomain=="yahoo.com")
        	    {
                	require("yahoo/class.GrabYahoo.php");
        	 		$obj = new GrabYahoo();
        			//echo $_POST['username'].$usrdomain;	
        	    }
        	
        		if($usrdomain=="live.com")
        	    {
        		$YOUR_EMAIL = $_POST['username']."@".$usrdomain;
        		//$obj = new msn;
        		//$returned_emails = $obj->getAddressbook($YOUR_EMAIL, $_POST['password']);
        		//echo $_POST['username']."@".$usrdomain;
        		if((isset($_POST['username'])) && (isset($_POST['password'])))
        			 {
                	require("hotmail/msn_contact_grab.class.php");
        			$msn2 = new msn;
        			$returned_emails = $msn2->getAddressbook($YOUR_EMAIL, $_POST['password']);
        				echo "<table border='1' bordercolor='#0000FF' align='center' ><tr><td align='center'><input type='checkbox' onclick='checkUncheckAll(this)' ><b>Select/Deselect</b></td><td align='center'><b>Name</b></td><td align='center'><b>Email Address</b></td></tr>";
               	 	foreach($returned_emails as $row)
        				{
                  		//echo "<tr><td>".$row['0']."</td><td>".$row['1']."</td></tr>";
        				echo "<tr><td>"."<input type='checkbox' name='chk' value='chk' >"."</td><td style='Font-Family:verdana;Font-Size:14'>".$row['1']."</td><td style='Font-Family:verdana;Font-Size:14'>".$row['0']."</td></tr>";
                		};
                		echo "</table>";
        			}
        	    }
        		else 
        		{
        			$contacts = $obj->getAddressbook($YOUR_EMAIL,$YOUR_PASSWORD);
        		}
        		$fp = fopen("cookie.txt","w+");
        		fwrite($fp,"");				
        		fclose($fp);
        	 	if(!is_array($contacts))
        	 	{
        	 		die('<p align="center"><font color="#FF0000">No contacts found</font></p>');
        	 	}
        	 	$str="";
        		if(is_array($contacts))
        		{
        			$totalRecords=0;
        			$actualfile = $YOUR_EMAIL.time().".csv";
                	$fileName="csvUpload/".$actualfile;
                
        			$handler= fopen($fileName,"a");
        			fwrite($handler,"NAME".","."EMAIL"."\n");
        		
        			$total = sizeof($contacts['name']);
        		
        			//print the addressbook 
        			$str.= "<table border='1' bordercolor='#0000FF' align='center' ><tr><td align='center'><input type='checkbox' onclick='checkUncheckAll(this)' ><b>Select/Deselect</b></td><td align='center'><b>Name</b></td><td align='center'><b>Email Address</b></td></tr>";
        			for ($i=0;$i< $total;$i++) 
        			{
        				$totalRecords = $totalRecords+1;
        				$rep 		  = array("<br>","&nbsp;");
        				
        				$str.="<tr><td>"."<input type='checkbox' name='chk' value='chk' >"."</td><td style='Font-Family:verdana;Font-Size:14'>".$contacts['name'][$i]."</td><td style='Font-Family:verdana;Font-Size:14'>".$contacts['email'][$i]."</td></tr>";
        				$contacts['email'][$i] = str_replace($rep, "",$contacts['email'][$i]);
        				$contacts['name'][$i]  = str_replace($rep, "",$contacts['name'][$i]);
        				fwrite($handler,$contacts['name'][$i].",".$contacts['email'][$i]."\n");
        			}
        			$str.= "</table>";
        			fclose($handler);
        		}
        		      
        		echo "<p align='center'><a href='header.php?filename=$actualfile'><font color='blue'>Save contacts as a CSV file</font></a>&nbsp;&nbsp; You have total <font color='blue'>$totalRecords</font> contacts</p>";
        		echo '<form>';
        		echo $str;	
        		echo '<br />';
        		echo '<p align="center"><input type="submit" name="submit" value="Send Invitation" /></p>';	
        		echo '</form>';		
        }
        ?>
        for gmail yahoo and rediff its working but i have a problem in hotmail file...

        thanx

        tokcy

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Does this have anything to do with the original question?

          Comment

          Working...