Thread Closed

#1
I know I have not been on here in a while.
Anyway happen to know where and if there is a open source/free email validation tool that uses a confirm link sent in the email or will I have to make my own php scripts I do not want some random person to be able to sign someone up to spam them with email alerts
I suppose I could make a folder on the server and generate a .htaccess and .htpasswd file and email a login starting to seem like a good idea the more I think about it guess I will start looking up how to send a email via php sorry for my lack of commas as I fail at them.
ReportQuote
#2
Hi az!

I am not aware of any project that does that, and only that. Most of them have it as part of a larger system. Sending email via PHP though is really easy, and most of the other stuff just tedious with nothing interesting in it.

Sorry I can't help much!

Have I helped you? Do you like my add-ons?
Would you consider donating to show your appreciation for my efforts?

/images/paypal.png
ReportQuote
#3
$char=array(
"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",
"a","b","c","d","e","f","g","h","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",
"0","1","2","3","4","5","6","7","8","9");
$user='';
$pass='';
while(strlen($user)<6){
	$user.=$char[rand(0,count($char)-1)];
}
while(strlen($pass)<9){
	$pass.=$char[rand(0,count($char)-1)];
}
$scan=scandir(getcwd());
$scan2=array();
foreach($scan as $file){
	if(is_numeric($file)){
		push($scan2,$file);
	}
}
$id=0;
while(in_array($scan2,$id)){
	$id++;
}
mkdir($id);
$htaccess="AuthUserFile ".getcwd()."/".$id."/.htpasswd\nAuthGroupFile /dev/null\nAuthName \"Restricted Access, Login info is in the email you got this link in.\"\nAuthType Basic\n<limit GET>\nrequire valid-user\n</Limit>";
$tmp=array();
foreach($_POST as $name=>$val){
	if(substr($name,3)=='tmp'){
		if(is_numeric($val)){
			push($tmp,$val);
		}
	}
}
$tmp=implode("\n", $tmp);
$htpasswd=$user.':'.crypt($pass,base64_encode($pass));
$f=fopen($id.'/.htaccess','x');
fwrite($f,$htaccess);
fclose($f);
$f=fopen($id.'/.htpasswd','x');
fwrite($f,$htpasswd);
fclose($f);
$f=fopen($id.'/tmp.txt','x');
fwrite($f,$tmp);//holds data for database one email is confirmed cron job a check to test is this file exist and if it does test the time to see if they had a chance to confirm it if they did delete the account
fclose($f);
$msg="http://".$_SERVER["SERVER_NAME"]."/acconts/".$id."/?mode=confirm\nUsername:\n".$name."\nPassword:\n".$pass;
if(mail($_POST['to'],'subject',$msg)){
	echo '<p>Mail is coming your way</p>';
}
else{
	echo '<p>Something went wrong sending mail :(</p>';
}

there may be bugs in that i did not test it
anyway is there a way to associate more than one id to a email and not have to get the entire table and process it to find out if an id in their list is needed to do a task
this would work for one id but subscription is an array expected length of under 20 at most
select email
from clients
where subscription=id
ReportQuote
#4
Sorry az, but I hardly follow your code, and am not exactly sure what your doing. Can I ask why you need to validate email addresses? I might be able to suggest something better if I know?

Have I helped you? Do you like my add-ons?
Would you consider donating to show your appreciation for my efforts?

/images/paypal.png
ReportQuote
#5
validation is so a person can't rig it to spam someone
be like subscribing a person to 200+ mail services each one sending 1 every 2.5-3.5 hours at most
i posted the code in-case anyone needs it i will clean/fix/finish it up later
i was asking at this point if there was a way to use an array in a database probably better to make a 3 column table
auto-increment-id,email,subscription
and have one row per subscription
if i could use an array instead of a new row it would save space
which should i use?
http://i54.tinypic.com/2ir3z0g_th.png

Edited by az on Dec. 15, 2010, 3:08 a.m.

ReportQuote
#6
I meant for what purpose do you need to collect email addresses, what kind of application is this going to fit into? It is come kine of newsletter thing? or for a web site membership?

I thought you might have been speaking about database stuff, but there is no indication of that in the code. I would chose the second option, which in my opinion would actually be simpler, at least in the slightly longer term. The data redundancy in the first will only give you problems.

Have I helped you? Do you like my add-ons?
Would you consider donating to show your appreciation for my efforts?

/images/paypal.png
ReportQuote
#7
that code was pre database it collects data for it
only gets inserted upon the user logging for the 1st time in another script
more like an alert system than a news thing

is there any code i need to use to make a relationship in phpmyadmin?
all i have done is stand alone tables so far...

Edited by az on Dec. 15, 2010, 10:22 a.m.

ReportQuote

Thread Closed