Jump to content

@ - \x40 why?


jarv

Recommended Posts

here is my code:

 

<?
    

$sendersemail = $_POST['sendersemail'];

//***********************************************************************************************************************************
//
//                                                 INSTRUCTION 1                                                        
//                                                                       
//   IMPORTANT -- DO NOT DELETE  <<<EOF  and EOF;   only edit the message in the middle. You can use HTML or plain text
//
//
//**********************************************************************************************************************************

$message = <<<EOF


Hello

Your friend $sendersemail has invited you to join them at www.mypubspace.com

I hope to see you there soon!!

mypubspace.com



EOF;


//********************************************************************************************************************************
//
//
//                                          INSTRUCTION 2
//
//                       CHANGE THE SUBJECT LINE BELOW TO YOUR OWN SUBJECT FOR THE EMAIL
//
//
//********************************************************************************************************************************



$subject = "mypubspace.com invitation"; 





//****************************************************************************************************************************************************
//
//
//                                          INSTRUCTION 3
//
// CHANGE EMAIL BELOW TO YOUR EMAIL ADDRESS --- IMPORTANT.. if you do not use your real domain nane in this email address, hotmail, yahoo etc WILL block it.
//
//
//
//****************************************************************************************************************************************************


$from = "mail@mutedesigns.co.uk";   









//********************************* DO NOT EDIT AFTER THIS LINE ****************************


foreach($_POST['list'] as $to) {


mail($to, $subject, $message, "From: $from");


}

//  [end of email sending]

echo "Messages have been sent";

?>

Link to comment
Share on other sites

here's another page of code:

<?

// GET NETWORK TO IMPORT FROM

$get = $_GET["domain"];

if (empty($get)){

$script = "myhotmail.php";

$img = "myhotmail.gif";

}else{

$script = $get.'.php';

$img = $get.'.gif';

}

?>



<HEAD>

<SCRIPT LANGUAGE="Javascript">

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function emailCheck (emailStr) {
/* The following pattern is used to check if the entered e-mail address
   fits the user@domain format.  It also is used to separate the username
   from the domain. */
var emailPat=/^(.+)@(.+)$/
/* The following string represents the pattern for matching all special
   characters.  We don't want to allow special characters in the address. 
   These characters include ( ) < > @ , ; : \ " . [ ]    */
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
/* The following string represents the range of characters allowed in a 
   username or domainname.  It really states which chars aren't allowed. */
var validChars="\[^\\s" + specialChars + "\]"
/* The following pattern applies if the "user" is a quoted string (in
   which case, there are no rules about which characters are allowed
   and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
   is a legal e-mail address. */
var quotedUser="(\"[^\"]*\")"
/* The following pattern applies for domains that are IP addresses,
   rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
   e-mail address. NOTE: The square brackets are required. */
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
/* The following string represents an atom (basically a series of
   non-special characters.) */
var atom=validChars + '+'
/* The following string represents one word in the typical username.
   For example, in john.doe@somewhere.com, john and doe are words.
   Basically, a word is either an atom or quoted string. */
var word="(" + atom + "|" + quotedUser + ")"
// The following pattern describes the structure of the user
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
/* The following pattern describes the structure of a normal symbolic
   domain, as opposed to ipDomainPat, shown above. */
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")


/* Finally, let's start trying to figure out if the supplied address is
   valid. */

/* Begin with the coarse pattern to simply break up user@domain into
   different pieces that are easy to analyze. */
var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
  /* Too many/few @'s or something; basically, this address doesn't
     even fit the general mould of a valid e-mail address. */
alert("Email address seems incorrect - Please type a valid email address")
return false
}
var user=matchArray[1]
var domain=matchArray[2]

// See if "user" is valid 
if (user.match(userPat)==null) {
    // user is not valid
    alert("The username doesn't seem to be valid.")
    return false
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
   host name) make sure the IP address is valid. */
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
    // this is an IP address
  for (var i=1;i<=4;i++) {
    if (IPArray[i]>255) {
        alert("Destination IP address is invalid!")
	return false
    }
    }
    return true
}

// Domain is symbolic name
var domainArray=domain.match(domainPat)
if (domainArray==null) {
alert("The domain name doesn't seem to be valid.")
    return false
}

/* domain name seems valid, but now make sure that it ends in a
   three-letter word (like com, edu, gov) or a two-letter word,
   representing country (uk, nl), and that there's a hostname preceding 
   the domain or country. */

/* Now we need to break up the domain to get a count of how many atoms
   it consists of. */
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 || 
    domArr[domArr.length-1].length>3) {
   // the address must end in a two letter or three letter word.
   alert("The address must end in a three-letter domain, or two letter country.")
   return false
}

// Make sure there's a host name preceding the domain.
if (len<2) {
   var errStr="This address is missing a hostname!"
   alert(errStr)
   return false
}

// If we've gotten this far, everything's valid!

return true;
document.emailform.reset();

}
//  End -->
</script>

<script language="javascript1.3" src="js/ahah.js" ></script>


</head>

<body>
<div align="center">
  <center>
<table border="0" width="498">
                          <tr>
    <TD width="551"><IMG height=2 alt="" src="images/spacer.gif" 
      width=1 border=0></TD>
                          </tr>
                          <tr>
    <TD align=middle width="551">
      <TABLE cellSpacing=0 cellPadding=0 width=494 border=0>
        <TBODY>
        <TR>
          <TD width=5 height=5><IMG height=5 alt="" 
            src="images/tls.gif" width=5 border=0></TD>
          <TD background="images/t.gif" colSpan=4 width="532"><IMG 
            height=1 alt="" src="images/spacer.gif" width=1 
            border=0></TD>
          <TD width=36 height=5><IMG height=5 alt="" 
            src="images/trs.gif" width=5 border=0></TD></TR>
        <TR>
          <TD width=5 background="images/l.gif" 
            height=5><IMG height=5 alt="" 
            src="images/spacer.gif" width=5 border=0></TD>
          <TD width=6><IMG height=1 alt="" 
            src="images/spacer.gif" width=6 border=0></TD>
          <TD vAlign=top width=496>
          
<!-- Start of Form -->
          
<form name=emailform action="javascript:submit('<?= $script ?>', 'POST');"  method=post onSubmit="return emailCheck(this.username.value);"> 

            <TABLE cellSpacing=0 cellPadding=5 width=468 align=center 
            bgColor=#ffffff border=0>
              <TBODY>
              <TR>
                <TD vAlign=top height=44 width="141"><IMG src="images/<?= $img ?>"> 
                <TD class=txt_sucks style="COLOR: #223f7a; PADDING-TOP: 12px" 
                width=307>
                  <p align="left"><b><font face="Arial" size="2">      
				IMPORT MY CONTACTS</font></b></TD></TR>
              <TR>
                <TD vAlign=top width=439 colspan="2">
			<div align="center">
                    <center>
                  <table border="0" width="104%" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="100%">
                        <table border="0" width="100%" cellspacing="1" cellpadding="0" height="21">
                          <tr>
                            <td width="12%" bgcolor="#EBEBEB" align="center"><font face="Arial" size="2">
						<a href="index.php?domain=myyahoo">
						<font color="#000000">Yahoo</font></a></font></td>
                            <td width="9%" bgcolor="#EBEBEB" align="center"><font face="Arial" size="2">
						<a href="index.php?domain=mygmail">
						<font color="#000000">Gmail</font></a></font></td>
                            <td width="14%" bgcolor="#EBEBEB" align="center"><font face="Arial" size="2">
						<a href="index.php?domain=myhotmail">
						<font color="#000000">Hotmail</font></a></font></td>
                            <td width="9%" bgcolor="#EBEBEB" align="center"><font face="Arial" size="2">
						<a href="index.php?domain=myaol">
						<font color="#000000">AOL</font></a></font></td>
                            <td width="11%" bgcolor="#EBEBEB" align="center">
						<a href="index.php?domain=mylycos">
						<font face="Arial" size="2" color="#000000">Lycos</font></a></td>
                            <td width="12%" bgcolor="#EBEBEB" align="center">
						<a href="index.php?domain=myrediffmail">
						<font face="Arial" size="2" color="#000000">
						Rediff</font></a></td>
                            <td width="14%" bgcolor="#EBEBEB" align="center">
						<a href="index.php?domain=mymail">
						<font face="Arial" size="2" color="#000000">Mail.com</font></a></td>
                            <td width="16%" bgcolor="#EBEBEB" align="center">
						<font face="Arial" size="2">
						<a href="index.php?domain=myindiatimes">
						<font color="#000000">Indiatimes</font></a></font></td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td width="100%">

<div align="center">
  <center>
  <table border="0" width="90%">
    <tr>
      <td width="100%">
        <div align="center">
          <table border="0" width="403">
            </center>
                    </center>

  </center>
            <tr>
    <td align="right" width="144">
      <p align="left"><font face="Arial" size="2"><b>             Email
      Address</b></font></p>
    </td>
  <center>
                    <center>
  <center>
    <td width="249"><input type="text" name="username" size="34"> </td>
            </tr>
            <tr>
    <td align="right" width="144"><font face="Arial" size="2"><b>Password</b></font></td>
    <td width="249"><input type="password" name="password" size="34"></td>
            </tr>
            <tr>
    <td align="right" width="144">
<p align="center"><u><font size="2">No details are stored</font></u></td>
    <td width="249"><input type="submit" value="Import My Contacts" style="background-color: #CCCCCC; border: 1 solid #666666"></td>
            </tr>
          </table>
        </div>
      </center></center></center>
      </td>
    </tr>
  </table>
</div>
</form>
</td>
                    </tr>
                  </table>
                  </div>
                </TD>
              </TR>
              </TBODY></TABLE></FORM></TD>
          <TD vAlign=top align=right width=5>
            <!-- InstanceEndEditable --></TD>
          <TD width=19><IMG height=1 alt="" 
            src="images/spacer.gif" width=1 border=0></TD>
          <TD width=36 background="images/r.gif" 
            height=5><IMG height=1 alt="" 
            src="images/spacer.gif" width=1 border=0></TD></TR>
        <TR>
          <TD width=5 height=5><IMG height=5 alt="" 
            src="images/bls.gif" width=5 border=0></TD>
          <TD background="images/b.gif" colSpan=4 width="532"><IMG 
            height=1 alt="" src="images/spacer.gif" width=1 
            border=0></TD>
          <TD width=36 height=5><IMG height=5 alt="" 
            src="images/brs.gif" width=5 
        border=0></TD></TR></TBODY></TABLE></TD>
                          </tr>
                        </table>

<div id="target"></div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div align="right">
<table border="0" width="19%">
	<tr>
		<td bgcolor="#CCCCCC" width="61"><font face="Arial" size="1">Powered 
		by</font></td>
		<td bgcolor="#EBEBEB"><font face="Arial" size="1">
		<a href="http://www.getmycontacts.com/"><font color="#000000">G e t 
		m y C o n t a c t s</font></a></font></td>
	</tr>
</table>
</div>
<p align="right"><font face="Arial" size="2"> </font></p>

Link to comment
Share on other sites

http://mypubspace.110mb.com/

 

still doesn't work, i put it into the following 3 pages?!

<?
$email = $row['email'];
$email = str_replace("\x40", "@", $email);
echo $email; // this will give you the new email address with @
// GET NETWORK TO IMPORT FROM

$get = $_GET["domain"];

if (empty($get)){

$script = "myhotmail.php";

$img = "myhotmail.gif";

}else{

$script = $get.'.php';

$img = $get.'.gif';

}
?>



<HEAD>

<SCRIPT LANGUAGE="Javascript">

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function emailCheck (emailStr) {
/* The following pattern is used to check if the entered e-mail address
   fits the user@domain format.  It also is used to separate the username
   from the domain. */
var emailPat=/^(.+)@(.+)$/
/* The following string represents the pattern for matching all special
   characters.  We don't want to allow special characters in the address. 
   These characters include ( ) < > @ , ; : \ " . [ ]    */
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
/* The following string represents the range of characters allowed in a 
   username or domainname.  It really states which chars aren't allowed. */
var validChars="\[^\\s" + specialChars + "\]"
/* The following pattern applies if the "user" is a quoted string (in
   which case, there are no rules about which characters are allowed
   and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
   is a legal e-mail address. */
var quotedUser="(\"[^\"]*\")"
/* The following pattern applies for domains that are IP addresses,
   rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
   e-mail address. NOTE: The square brackets are required. */
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
/* The following string represents an atom (basically a series of
   non-special characters.) */
var atom=validChars + '+'
/* The following string represents one word in the typical username.
   For example, in john.doe@somewhere.com, john and doe are words.
   Basically, a word is either an atom or quoted string. */
var word="(" + atom + "|" + quotedUser + ")"
// The following pattern describes the structure of the user
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
/* The following pattern describes the structure of a normal symbolic
   domain, as opposed to ipDomainPat, shown above. */
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")


/* Finally, let's start trying to figure out if the supplied address is
   valid. */

/* Begin with the coarse pattern to simply break up user@domain into
   different pieces that are easy to analyze. */
var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
  /* Too many/few @'s or something; basically, this address doesn't
     even fit the general mould of a valid e-mail address. */
alert("Email address seems incorrect - Please type a valid email address")
return false
}
var user=matchArray[1]
var domain=matchArray[2]

// See if "user" is valid 
if (user.match(userPat)==null) {
    // user is not valid
    alert("The username doesn't seem to be valid.")
    return false
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
   host name) make sure the IP address is valid. */
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
    // this is an IP address
  for (var i=1;i<=4;i++) {
    if (IPArray[i]>255) {
        alert("Destination IP address is invalid!")
	return false
    }
    }
    return true
}

// Domain is symbolic name
var domainArray=domain.match(domainPat)
if (domainArray==null) {
alert("The domain name doesn't seem to be valid.")
    return false
}

/* domain name seems valid, but now make sure that it ends in a
   three-letter word (like com, edu, gov) or a two-letter word,
   representing country (uk, nl), and that there's a hostname preceding 
   the domain or country. */

/* Now we need to break up the domain to get a count of how many atoms
   it consists of. */
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 || 
    domArr[domArr.length-1].length>3) {
   // the address must end in a two letter or three letter word.
   alert("The address must end in a three-letter domain, or two letter country.")
   return false
}

// Make sure there's a host name preceding the domain.
if (len<2) {
   var errStr="This address is missing a hostname!"
   alert(errStr)
   return false
}

// If we've gotten this far, everything's valid!

return true;
document.emailform.reset();

}
//  End -->
</script>

<script language="javascript1.3" src="js/ahah.js" ></script>


</head>

<body>
<div align="center">
  <center>
<table border="0" width="498">
                          <tr>
    <TD width="551"><IMG height=2 alt="" src="images/spacer.gif" 
      width=1 border=0></TD>
                          </tr>
                          <tr>
    <TD align=middle width="551">
      <TABLE cellSpacing=0 cellPadding=0 width=494 border=0>
        <TBODY>
        <TR>
          <TD width=5 height=5><IMG height=5 alt="" 
            src="images/tls.gif" width=5 border=0></TD>
          <TD background="images/t.gif" colSpan=4 width="532"><IMG 
            height=1 alt="" src="images/spacer.gif" width=1 
            border=0></TD>
          <TD width=36 height=5><IMG height=5 alt="" 
            src="images/trs.gif" width=5 border=0></TD></TR>
        <TR>
          <TD width=5 background="images/l.gif" 
            height=5><IMG height=5 alt="" 
            src="images/spacer.gif" width=5 border=0></TD>
          <TD width=6><IMG height=1 alt="" 
            src="images/spacer.gif" width=6 border=0></TD>
          <TD vAlign=top width=496>
          
<!-- Start of Form -->
          
<form name=emailform action="javascript:submit('<?= $script ?>', 'POST');"  method=post onSubmit="return emailCheck(this.username.value);"> 

            <TABLE cellSpacing=0 cellPadding=5 width=468 align=center 
            bgColor=#ffffff border=0>
              <TBODY>
              <TR>
                <TD vAlign=top height=44 width="141"><IMG src="images/<?= $img ?>"> 
                <TD class=txt_sucks style="COLOR: #223f7a; PADDING-TOP: 12px" 
                width=307>
                  <p align="left"><b><font face="Arial" size="2">      
				IMPORT MY CONTACTS</font></b></TD></TR>
              <TR>
                <TD vAlign=top width=439 colspan="2">
			<div align="center">
                    <center>
                  <table border="0" width="104%" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="100%">
                        <table border="0" width="100%" cellspacing="1" cellpadding="0" height="21">
                          <tr>
                            <td width="12%" bgcolor="#EBEBEB" align="center"><font face="Arial" size="2">
						<a href="index.php?domain=myyahoo">
						<font color="#000000">Yahoo</font></a></font></td>
                            <td width="9%" bgcolor="#EBEBEB" align="center"><font face="Arial" size="2">
						<a href="index.php?domain=mygmail">
						<font color="#000000">Gmail</font></a></font></td>
                            <td width="14%" bgcolor="#EBEBEB" align="center"><font face="Arial" size="2">
						<a href="index.php?domain=myhotmail">
						<font color="#000000">Hotmail</font></a></font></td>
                            <td width="9%" bgcolor="#EBEBEB" align="center"><font face="Arial" size="2">
						<a href="index.php?domain=myaol">
						<font color="#000000">AOL</font></a></font></td>
                            <td width="11%" bgcolor="#EBEBEB" align="center">
						<a href="index.php?domain=mylycos">
						<font face="Arial" size="2" color="#000000">Lycos</font></a></td>
                            <td width="12%" bgcolor="#EBEBEB" align="center">
						<a href="index.php?domain=myrediffmail">
						<font face="Arial" size="2" color="#000000">
						Rediff</font></a></td>
                            <td width="14%" bgcolor="#EBEBEB" align="center">
						<a href="index.php?domain=mymail">
						<font face="Arial" size="2" color="#000000">Mail.com</font></a></td>
                            <td width="16%" bgcolor="#EBEBEB" align="center">
						<font face="Arial" size="2">
						<a href="index.php?domain=myindiatimes">
						<font color="#000000">Indiatimes</font></a></font></td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td width="100%">

<div align="center">
  <center>
  <table border="0" width="90%">
    <tr>
      <td width="100%">
        <div align="center">
          <table border="0" width="403">
            </center>
                    </center>

  </center>
            <tr>
    <td align="right" width="144">
      <p align="left"><font face="Arial" size="2"><b>             Email
      Address</b></font></p>
    </td>
  <center>
                    <center>
  <center>
    <td width="249"><input type="text" name="username" size="34"> </td>
            </tr>
            <tr>
    <td align="right" width="144"><font face="Arial" size="2"><b>Password</b></font></td>
    <td width="249"><input type="password" name="password" size="34"></td>
            </tr>
            <tr>
    <td align="right" width="144">
<p align="center"><u><font size="2">No details are stored</font></u></td>
    <td width="249"><input type="submit" value="Import My Contacts" style="background-color: #CCCCCC; border: 1 solid #666666"></td>
            </tr>
          </table>
        </div>
      </center></center></center>
      </td>
    </tr>
  </table>
</div>
</form>
</td>
                    </tr>
                  </table>
                  </div>
                </TD>
              </TR>
              </TBODY></TABLE></FORM></TD>
          <TD vAlign=top align=right width=5>
            <!-- InstanceEndEditable --></TD>
          <TD width=19><IMG height=1 alt="" 
            src="images/spacer.gif" width=1 border=0></TD>
          <TD width=36 background="images/r.gif" 
            height=5><IMG height=1 alt="" 
            src="images/spacer.gif" width=1 border=0></TD></TR>
        <TR>
          <TD width=5 height=5><IMG height=5 alt="" 
            src="images/bls.gif" width=5 border=0></TD>
          <TD background="images/b.gif" colSpan=4 width="532"><IMG 
            height=1 alt="" src="images/spacer.gif" width=1 
            border=0></TD>
          <TD width=36 height=5><IMG height=5 alt="" 
            src="images/brs.gif" width=5 
        border=0></TD></TR></TBODY></TABLE></TD>
                          </tr>
                        </table>

<div id="target"></div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div align="right">
<table border="0" width="19%">
	<tr>
		<td bgcolor="#CCCCCC" width="61"><font face="Arial" size="1">Powered 
		by</font></td>
		<td bgcolor="#EBEBEB"><font face="Arial" size="1">
		<a href="http://www.getmycontacts.com/"><font color="#000000">G e t 
		m y C o n t a c t s</font></a></font></td>
	</tr>
</table>
</div>
<p align="right"><font face="Arial" size="2"> </font></p>

 

<?

//REV 3.3 [ 29-12-2006 ]

/////////////////////////////////////////////////////////////////////////////////////////
//                                                                                     //
//                                                                                     //
//                                                                                     //
//                        HOTMAIL CONTACT IMPORTING SCRIPT                             //
//                             COPYRIGHT RESERVED                                      //
//                                                                                     //
//            You may not distribute this software without prior permission            //
//                                                                                     //
//                                                                                     //
//                           WWW.GETMYCONTACTS.COM                                     //
//                                                                                     //
/////////////////////////////////////////////////////////////////////////////////////////


//******************************* | SETTING VARIABLES | ***********************************\\


$username = $_POST["username"];

$password = $_POST["password"];

$refering_site = "http://mail.hotmail.com/"; //setting the site for refer

$browser_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)"; //setting browser type

$path_to_cookie = realpath('hotmailcookie.txt');

$setcookie = fopen($path_to_cookie, 'wb'); //this opens the file and resets it to zero length
fclose($setcookie);



//*********************** | LOGGING ONTO HOTMAIL STEP 1 | ***********************************\\

$login_page = "http://login.live.com/login.srf?id=2&vv=400&lc=1033";



$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $login_page);               
curl_setopt($ch, CURLOPT_USERAGENT, $browser_agent);      
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);              
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);          
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);              
curl_setopt($ch, CURLOPT_COOKIEFILE, $path_to_cookie);    
curl_setopt($ch, CURLOPT_COOKIEJAR, $path_to_cookie);     
$page_result = curl_exec ($ch);
curl_close ($ch);


// echo "<textarea rows=30 cols=120>".$page_result."</textarea>";       //DEBUG -- this will pages html in nice box



//*********************** | GET HIDDEN FIELDS | *********************************************\\


// (1) get PPFT fieled

preg_match_all("/name=\"PPFT\" id=\"i0327\" value=\"(.*?)\"/", $page_result, $matches1); 

// print_r($matches1);                     // DEBUG -- this will print the whole array

$found1 = $matches1[1][0];                 // stores the hidden text in a ariable to use later in POST



// (2) get PPSX field

preg_match_all("/name=\"PPSX\" value=\"(.*?)\"/", $page_result, $matches2); 

// print_r($matches2);                     // DEBUG -- this will print the whole array

$found2 = $matches2[1][0];                 // stores the hidden text in a ariable to use later in POST



// (3) get PwdPad field NOTE -- this is usually empty field


preg_match_all("/name=\"PwdPad\" id=\"i0340\" value=\"(.*?)\"/", $page_result, $matches3); 

//print_r($matches3);                     // DEBUG -- this will print the whole array

$found3= $matches3[1][0];                 // stores the hidden text in a ariable to use later in POST


// (4) get url for posting form


preg_match_all("/method=\"POST\" target=\"_top\" action=\"(.*?)\"/", $page_result, $matches4); 

//print_r($matches4);                     // DEBUG -- this will print the whole array

$found4= $matches4[1][0];                 // stores the hidden text in a ariable to use later in POST



// (5) get login options from form

preg_match_all("/name=\"LoginOptions\" id=\"i0136\" value=\"(.*?)\"/", $page_result, $matches5); 

//print_r($matches5);                     // DEBUG -- this will print the whole array

$found5= $matches5[1][0];                 // stores the hidden text in a ariable to use later in POST



//******************************* | SUBMIT LOGIN INFORMATION | ************************************\\




$login_page2 = $found4;

$postdata1='PPSX='.$found2.'&'.'PwdPad='.$found3.'&'.'login='.$username.'&'.'passwd='.$password.'&'.'LoginOptions='.$found5.'&'.'PPFT='.$found1;


$ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL,$login_page2);
curl_setopt($ch, CURLOPT_USERAGENT, $browser_agent);
    curl_setopt($ch, CURLOPT_POST, 1); 
    curl_setopt($ch, CURLOPT_POSTFIELDS,$postdata1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_REFERER, $login_page);
curl_setopt($ch, CURLOPT_COOKIEFILE, $path_to_cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $path_to_cookie);
    $result3 = curl_exec ($ch);
    curl_close ($ch); 

//echo $result3;


//***************************************** | REDIRECT 1 | *****************************************\\


preg_match_all("/replace\(\"(.*?)\"/", $result3, $arr_post);	
$quick_change = $arr_post[1][0];

$ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL,$quick_change);
curl_setopt($ch, CURLOPT_USERAGENT, $browser_agent);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_REFERER, $browser_agent);
curl_setopt($ch, CURLOPT_COOKIEFILE, $path_to_cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $path_to_cookie);
    $result4 = curl_exec ($ch);
    curl_close ($ch); 

// echo $result4;

// [getting the curmbox]


//echo "<textarea rows=30 cols=130>".$result."</textarea>"; 	
//preg_match_all("/_UM=\"(.*?)\"/", $result4, $matches6);	

//print_r($matches6);

//$address_url_string = $matches6[1][0];

    //echo $address_url_string;

//*********************************** | OPEN ADDREDD CHERRY PICKER | ************************************\\

$address_bookurl = 'http://by101fd.bay101.hotmail.msn.com/cgi-bin/AddressPicker?Context=InsertAddress&_HMaction=Edit&qF=to';

$ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL,$address_bookurl);
curl_setopt($ch, CURLOPT_USERAGENT, $browser_agent);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_REFERER, $quick_change);
curl_setopt($ch, CURLOPT_COOKIEFILE, $path_to_cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $path_to_cookie);
    $result2 = curl_exec ($ch);
    curl_close ($ch); 

//echo $result;

//echo "<textarea rows=30 cols=130>".$result."</textarea>"; 	

			//$myFile = "testFile.csv";
			//$fh = fopen($myFile, 'w') or die("can't open file");
			//fwrite($fh, $result2);


preg_match_all('%<option[^>]*value="([^"]*)"[^>]*>([^<]*)<[^>]*></option>%', $result2, $matches, PREG_SET_ORDER);

//print_r($matches);

$email = $row['email'];
$email = str_replace("\x40", "@", $email);
echo $email; // this will give you the new email address with @
$arraycount= count($matches);

$checkarray = $matches[1][1];

IF (empty($checkarray)){

require 'mylive.php';  //************ This get mylive.php file and runs it instead.

}ELSE{


//***************** | LOGGING ONTO GMAIL STEP 8 [html display] | ********************\\
//
//
//
//
//
//***********************************************************************************\\


// [header section - html]

$header = <<<headertext

<html>
<head>
<title>CONTACTS</title>
<script type="text/javascript"><!--

var formblock;
var forminputs;

function prepare() {
formblock= document.getElementById('form_id');
forminputs = formblock.getElementsByTagName('input');
}

function select_all(name, value) {
for (i = 0; i < forminputs.length; i++) {
// regex here to check name attribute
var regex = new RegExp(name, "i");
if (regex.test(forminputs[i].getAttribute('name'))) {
if (value == '1') {
forminputs[i].checked = true;
} else {
forminputs[i].checked = false;
}
}
}
}

if (window.addEventListener) {
window.addEventListener("load", prepare, false);
} else if (window.attachEvent) {
window.attachEvent("onload", prepare)
} else if (document.getElementById) {
window.onload = prepare;
}

//--></script>
</head>
<body>

headertext;

//echo $header;

// [RESULTS -TITLE HTML] 

$title = <<<titletext

<div align="center">
<center>
<table border="0" width="578" bgcolor="#FFFFFF"><tr>
<TD width="622"><IMG height=2 alt="" src="images/spacer.gif" width=1 border=0></TD>
</tr><tr><TD align=middle width="622"><TABLE cellSpacing=0 cellPadding=0 width=640 border=0>
<TBODY><TR><TD width=5 height=5><IMG height=5 alt="" src="images/tls.gif" width=5 border=0></TD>
<TD background="images/t.gif" colSpan=2 width="716"><IMG height=1 alt="" src="images/spacer.gif" width=1 border=0></TD>
<TD width=6 height=5><IMG height=5 alt="" src="images/trs.gif" width=5 border=0></TD></TR><TR>
<TD width=5 background="images/l.gif" height=5><IMG height=5 alt="" src="images/spacer.gif" width=5 border=0></TD>
<TD width=6><IMG height=1 alt="" src="images/spacer.gif" width=6 border=0></TD><TD vAlign=top width=704>
<table border="0" width="100%"><tr><td width="100%" bgcolor="#D7D8DF">
<p align="center"><font face="Arial" size="3" color="#333333">My Contacts</font></td></tr></table>
<p align="center">
    
titletext;

echo $title;

// [RESULTS - START OF FORM]



echo '<form id="form_id" name="myform" method="post" action="postage.php">';

echo '<div align="center"><center><table border="0" cellpadding="3" cellspacing="6" width="100%">';

	$i = 0;
	while (isset($matches[$i])):

//  [RESULTS - START OF CONTACTS LIST]



echo '<tr><td width="22" bgcolor="#F5F5F5"><input type="checkbox" name="list[]" value="'.$matches[$i][1].'" checked></td><td width="269" bgcolor="#F5F5F5"><p align="center"><font face="Verdana" size="2">'.$matches[$i][2].'</font></td><td width="296" bgcolor="#F5F5F5"><p align="center"><font face="Verdana" size="2">'.$matches[$i][1].'</font></td><input type="hidden" name="sendersemail" size="20" value="'.$username.'"></tr>';


	$i++;
	endwhile;

//  [RESULTS - START OF FOOTER]

echo '</table></center></div>';

$footer = <<<footertext

<table border="0" width="100%"><tr><td width="100%">
<p align="center"><font face="Arial" size="2"><br></font><br>
<p></p><p align="center"><input type="submit" value="Send Email To Contacts" name="B1" style="background-color: #808080; color: #FFFFFF; font-family: Arial; font-size: 10pt; font-weight: bold; border: 1 solid #333333"></p></form></td></tr>
</table><IMG height=1 alt="" src="images/spacer.gif" width=1 border=0></TD>
<TD width=6 background="images/r.gif" height=5><IMG height=1 alt="" src="images/spacer.gif" width=1 border=0></TD></TR>
<TR><TD width=5 height=5><IMG height=5 alt="" src="images/bls.gif" width=5 border=0></TD>
<TD background="images/b.gif" colSpan=2 width="716"><IMG height=1 alt="" src="images/spacer.gif" width=1 border=0></TD>
<TD width=6 height=5><IMG height=5 alt="" src="images/brs.gif" width=5 border=0></TD></TR></TBODY></TABLE></TD>                      </tr></table></center></div>

footertext;

echo $footer;



//*********************** | END OF SCRIPT | ***********************************\\
}
?>

 

<?
    

$sendersemail = $_POST['sendersemail'];

//***********************************************************************************************************************************
//
//                                                 INSTRUCTION 1                                                        
//                                                                       
//   IMPORTANT -- DO NOT DELETE  <<<EOF  and EOF;   only edit the message in the middle. You can use HTML or plain text
//
//
//**********************************************************************************************************************************

$message = <<<EOF


Hello

Your friend $sendersemail has invited you to join them at www.mypubspace.com

I hope to see you there soon!!

mypubspace.com



EOF;


//********************************************************************************************************************************
//
//
//                                          INSTRUCTION 2
//
//                       CHANGE THE SUBJECT LINE BELOW TO YOUR OWN SUBJECT FOR THE EMAIL
//
//
//********************************************************************************************************************************



$subject = "mypubspace.com invitation"; 





//****************************************************************************************************************************************************
//
//
//                                          INSTRUCTION 3
//
// CHANGE EMAIL BELOW TO YOUR EMAIL ADDRESS --- IMPORTANT.. if you do not use your real domain nane in this email address, hotmail, yahoo etc WILL block it.
//
//
//
//****************************************************************************************************************************************************


$from = "mail@mutedesigns.co.uk";   









//********************************* DO NOT EDIT AFTER THIS LINE ****************************
echo htmlspecialchars_decode("\x40");

foreach($_POST['list'] as $to) {


mail($to, $subject, $message, "From: $from");

$email = $row['email'];
$email = str_replace("\x40", "@", $email);
echo $email; // this will give you the new email address with @
}

//  [end of email sending]

echo "Messages have been sent";

?>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.