Invite Your Friend To Your Site

Started on the old forum in March 2008 · view the original in the archive · old links redirect here

9 replies · 1,209 views · started 18 years ago · 1 min read

5 participants
Ghost Senior · 366 posts #1

heres a email invite script i created.. i have tested this on msn/hotmail.. and yahoo ive tested it on my personal site email.. and my phones network operators email system too.. and it goes to their inbox every time not junk mail lol.. i couldnt test gmail was too lazy to make an acount lol..

heres the outcome from msn and yahoo

Invitation From: Ghost (wapaholics@hotmail.com) Sent: 20 March 2008 04:47:48 Reply-to: wapaholics@hotmail.com To: wapaholics@yahoo.co.uk

this is not a spam email. it was sent to you from Ghost who's email is wapaholics@hotmail.com they have invited you to join this site http://wapchat.uk.to if you dont know the person who has sent this message or you do not wish to join please dis-regard this email

if you constantly get messages from this person/site please feel free to go to the site and let the owner know and they will make sure it is stopped and you have no further problems..

HERES THE SCRIPT

<?php
header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" 
\"http://www.wapforum.org/DTD/wml_1.2.xml\">\n";

/**
* @author Ghost (CODEMAFiA.ORG)
* @copyright 2008-2009 Invitation Script
*/

echo "<wml>\n";
echo "<head>";
echo "<meta name=\"keywords\" content=\"email, invite, email sender, invite a friend\"/>";
echo "<meta name=\"description\" content=\"email sender\"/>";
echo "<meta name=\"robots\" content=\"send_invite, follow\"/>";
echo "<meta name=\"revisit-after\" content=\"1 days\"/>";
echo "<meta name=\"rating\" content=\"general\"/>";
echo "<meta name=\"author\" content=\"ghost\"/>";
echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
echo "</head>";
echo "<card id=\"source\" title=\"Ghost Invite\">";
echo "<p align=\"center\">";
echo "[size="1"]";

$url = $_GET['url'];

/* YOUR SITE AND SUBJECT INFORMATION GOES HERE! */

$site = "http://wapchat.uk.to";
$subject = "Invitation";

/* AND YOUR MESSAGE INFORMATION GOES HERE */
/* HERES MY EXAMPLE INVITE */
$message = "
this is not a spam email. 
it was sent to you from $from who's email is $fromemail 
they have invited you to join this site $site 
if you dont know the person who has sent this message or you do not 
wish to join please dis-regard this email
------------------------------------------
if you constantly get messages from this person/site 
please feel free to go to the site and let the owner know and 
they will make sure it is stopped and you have no further problems..
";

/* NOW TIME FOR THE MAIN PAGE */

if ($url == "")
{
echo "<small>[b]Send an invite for one of your friends to join our site:[/b][/size]

";

echo "[size="1"][b]Send to email:[/b][/size]
";
echo "<input type=\"text\" name=\"email\" value=\"@\" emptyok=\"true\" maxlength=\"70\"/>
";

echo "[size="1"][b]Your email:[/b][/size]
";
echo "<input type=\"text\" name=\"fromemail\" value=\"@\" emptyok=\"true\" maxlength=\"70\"/>
";

echo "[size="1"][b]Your name:[/b][/size]
";
echo "<input type=\"text\" name=\"from\" value=\"\" emptyok=\"true\" maxlength=\"20\"/>
";

echo "[size="1"]";
echo "<anchor>»Send";
echo "<go method=\"post\" href=\"send_invite.php?url=result\">";
echo "<postfield name=\"email\" value=\"$(email)\"/>";
echo "<postfield name=\"fromemail\" value=\"$(fromemail)\"/>";
echo "<postfield name=\"from\" value=\"$(from)\"/>";
echo "</go></anchor>
";

echo "---
<a href=\"index.php?time=".time()."\">Back</a>";
echo "
---
";
echo "[/size]";
}

/* NOW TIME FOR THE CONFIRMATION PAGE */

if ($url == "result")
{
if ($email == "" OR $fromemail == "" OR $from == "")
{
echo "Please fill in All fields!!
---
";
echo "<a href=\"send_invite.php\">« Back</a>
";
}
else
{ 
$headers = "From: $from <$fromemail>\n";
$headers .= "Reply-To: <$fromemail>\n\n";

mail ($email, $subject, $message, $headers);

echo "Thanks $from! Your message has been sent to $email!
";
}
echo "---
<a href=\"send_invite.php?time=".time()."\">back</a>";
echo "
---
";
}

/* MY COPYRIGHT AND END OF SCRIPT*/

echo "© Ghost Invite - ".date(Y);
echo "</small>";
echo "</p>\n";
echo "</card>\n";
echo "</wml>\n";
?>

ENJOY: External image (may be gone)

<?php include ('Ghost'); if ($Post == true) { echo ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>
Ghost Senior · 366 posts #2

oh sorry i forgot to mention on the first post you must make the file send_invite.php.. or i guess you could name it anything you like and just change ALL send_invite in the code to the new name you choose..

<?php include ('Ghost'); if ($Post == true) { echo ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>
khan1 Developer · 101 posts #3

good script i need to add sessions for this script coz if a member of the site wants to send invite's and after sending returns to forums wihout losing sessions also if possible user name added

chatabox Senior · 361 posts #4

good script i need to add sessions for this script coz if a member of the site wants to send invite's and after sending returns to forums wihout losing sessions also if possible user name added

You could easily add this to lavalair.. if your using it why not just work out how to make a blank template page of which you could add any php... lavalair is the most overused thing on wap and this was not made for it. Also i can't speak for ghost but i know anything i release will never be catered for that script.

You can easily see how the pages are formed on index.php and even more easily add any code you desire.

PS: at amy an blaze you guys should really make a support/homepage for lavalair, im even getting these lavalair related questions on my site now.

GumSlone Administrator Principal · 1,690 posts #5

oh sorry i forgot to mention on the first post you must make the file send_invite.php.. or i guess you could name it anything you like and just change ALL send_invite in the code to the new name you choose..

you can replace send_invite.php in the code width

".$_SERVER['PHP_SELF']."

so you can rename the file then the way you want.

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

khan1 Developer · 101 posts #6

i have added sessions and now when i click back i return to main menu without losing sess...... but after sending message if i click main menu link , ses..... is lost

CODE

<?php include("config.php"); include("core.php"); header("Content-type: text/vnd.wap.wml"); header("Cache-Control: no-store, no-cache, must-revalidate"); echo "<?xml version=\"1.0\"?>";

echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; ?> <wml>

<?php $bcon = connectdb(); if (!$bcon) { echo "<card id=\"main\" title=\"(ERROR!)\">"; echo " "; echo "<img src=\"../images/exit.gif\" alt=\"!\"/> "; echo "**Error! Cannot Connect To Database...** "; echo "This error happens usually when backing up the database, please be patient..."; echo " "; echo "</card>"; echo "</wml>"; exit(); } $brws = explode("/",$HTTP_USER_AGENT); $ubr = $brws[0]; $uip = getip(); $action = $_GET["action"]; $sid = $_GET["sid"]; $page = $_GET["page"]; $who = $_GET["who"]; $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'")); $sitename = $sitename[0]; $uid = getuid_sid($sid); cleardata(); if(($action != "") && ($action!="terms")) { $uid = getuid_sid($sid); if((islogged($sid)==false)||($uid==0)) { echo "<card id=\"main\" title=\"$sitename\">"; echo " "; echo "You are not logged in "; echo "Or Your session has been expired "; echo "<a href=\"index.php\">Login</a>"; echo " "; echo "</card>"; echo "</wml>"; exit(); } } echo "<card id=\"source\" title=\"Ghost Invite\">"; echo " "; echo ""; $url = $_GET['url']; /* YOUR SITE AND SUBJECT INFORMATION GOES HERE! */ $site = "http://wapchat.uk.to"; $subject = "Invitation"; /* AND YOUR MESSAGE INFORMATION GOES HERE */ /* HERES MY EXAMPLE INVITE */ $message = " this is not a spam email. it was sent to you from $from who's email is $fromemail they have invited you to join this site $site if you dont know the person who has sent this message or you do not wish to join please dis-regard this email ------------------------------------------ if you constantly get messages from this person/site please feel free to go to the site and let the owner know and they will make sure it is stopped and you have no further problems.. "; /* NOW TIME FOR THE MAIN PAGE */ if ($url == "") { echo "**Send an invite for one of your friends to join our site:** "; echo "**Send to email:** "; echo "<input type=\"text\" name=\"email\" value=\"@\" emptyok=\"true\" maxlength=\"70\"/> "; echo "**Your email:** "; echo "<input type=\"text\" name=\"fromemail\" value=\"@\" emptyok=\"true\" maxlength=\"70\"/> "; echo "**Your name:** "; echo "<input type=\"text\" name=\"from\" value=\"\" emptyok=\"true\" maxlength=\"20\"/> "; echo ""; echo "<anchor>»Send"; echo "<go method=\"post\" href=\"send_invite.php?url=result\">"; echo "<postfield name=\"email\" value=\"$(email)\"/>"; echo "<postfield name=\"fromemail\" value=\"$(fromemail)\"/>"; echo "<postfield name=\"from\" value=\"$(from)\"/>"; echo "</go></anchor> "; echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo " --- "; echo ""; } /* NOW TIME FOR THE CONFIRMATION PAGE */ if ($url == "result") { if ($email == "" OR $fromemail == "" OR $from == "") { echo "Please fill in All fields!! --- "; echo "<a href=\"send_invite.php\">« Back</a> "; } else { $headers = "From: $from <$fromemail>\n"; $headers .= "Reply-To: <$fromemail>\n\n"; mail ($email, $subject, $message, $headers); echo "Thanks $from! Your message has been sent to $email! "; } echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo " --- "; } /* MY COPYRIGHT AND END OF SCRIPT*/ echo "© Ghost Invite - ".date(Y); echo ""; echo " \n"; echo "</card>\n"; ?> </wml>
khan1 Developer · 101 posts #7

check earlier post

Ghost Senior · 366 posts #8

you can replace send_invite.php in the code width

".$_SERVER['PHP_SELF']."

so you can rename the file then the way you want.

yeah thanks gumslone. i already knew that i was just trying to make a quick invite in 1 hour for somebody.. after i made it i just posted straight away without thinking bout cleaning links up.. will probably do it next time..

<?php include ('Ghost'); if ($Post == true) { echo ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>
Ghost Senior · 366 posts #9

check earlier post

sorry bro but i do not use lavalair so i cannot help on this matter..

<?php include ('Ghost'); if ($Post == true) { echo ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>
djdevil89 Senior · 287 posts #10

I have Recoded this script to Xhtml hope you enjoy it here you go:

<?php

echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";

?>
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
echo "<head>";
echo "<meta name=\"keywords\" content=\"email, invite, email sender, invite a friend\"/>";
echo "<meta name=\"description\" content=\"email sender\"/>";
echo "<meta name=\"robots\" content=\"send_invite, follow\"/>";
echo "<meta name=\"revisit-after\" content=\"1 days\"/>";
echo "<meta name=\"rating\" content=\"general\"/>";
echo "<meta name=\"author\" content=\"ghost\"/>";
echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
echo "</head>";
echo "<title>Ghost Invite</title>";
echo "<body
bgcolor=\"Black\">";
echo "<p align=\"center\">";
echo "[size="1"]";

$url = $_GET['url'];

/* YOUR SITE AND SUBJECT INFORMATION GOES HERE! */

$site = "http://wapzone.biz";
$subject = "Invitation";

/* AND YOUR MESSAGE INFORMATION GOES HERE */
/* HERES MY EXAMPLE INVITE */
$message = "
this is not a spam email. 
it was sent to you from $from who's email is $fromemail 
they have invited you to join this site $site 
if you dont know the person who has sent this message or you do not 
wish to join please dis-regard this email
------------------------------------------
if you constantly get messages from this person/site 
please feel free to go to the site and let the owner know and 
they will make sure it is stopped and you have no further problems..
";

/* NOW TIME FOR THE MAIN PAGE */

if ($url == "")
{
echo "<big>[b]<font color=\"white\">Send an invite for one of your friends to join our site:[/b]</big>

";

echo "<small>";
echo "<form action=\"send_invite.php?url=result\" method=\"post\">
";
//echo "<form action=\"post\" href=\"send_invite.php?url=result\">
";
echo "[b]Your Friends Email[/b]<input name=\"email\" value=\"$email\"/>
";
echo "[b]Your Email[/b]<input name=\"fromemail\" value=\"$fromemail\"/>
";
echo "[b]Your Name</font>[/b]<input name=\"from\" value=\"$from\"/>
";
echo "
<input type=\"Submit\" Name=\"Submit\" Value=\"Submit\"></form>";

echo "---
<a href=\"index.php?time=".time()."\">Back</a>";
echo "
---
";
echo "[/size]";
}

/* NOW TIME FOR THE CONFIRMATION PAGE */

if ($url == "result")
{
if ($email == "" OR $fromemail == "" OR $from == "")
{
echo "Please fill in All fields!!
---
";
echo "<a href=\"send_invite.php\">« Back</a>
";
}
else
{ 
$headers = "From: $from <$fromemail>\n";
$headers .= "Reply-To: <$fromemail>\n\n";

mail ($email, $subject, $message, $headers);

echo "Thanks $from! Your message has been sent to $email!
";
}
echo "---
<a href=\"send_invite.php?time=".time()."\">back</a>";
echo "
---
";
}

/* MY COPYRIGHT AND END OF SCRIPT*/

echo "© Ghost Invite - ".date(Y);
echo "</small>";
echo "</p>\n";
echo "</body>\n";
echo "</html>\n";
?>
foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close