News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

member emails

Started by Ventic, March 18, 2012, 10:19:51 AM

Previous topic - Next topic

pkrack

@Kindred thanks for comments. Actually i am very busy now days in writing code for a mobile search engine toplist due to which i wrote this code roughly. And thanks for fixing it. :-)

Ventic

Internal Server Error now i got this damn

pkrack

           You mean 500 internal error. Does your host support .txt files? Some server do not support that and can possibly cause an error.
           Some time php also cause error with looping but this code isnt repeating. I think i have to test it on my own server

Ventic

it accept txt files yes

pkrack


<?php include("Settings.php");

$conn=@mysql_connect($db_server,$db_user,$db_pass);
if(!
$conn)return false;
$db=@mysql_select_db($db_name);
if(!
$db)return false;
return 
true;

$sql=mysql_Query("SELECT * from Smf_members");
$get=mysql_fetch_array($sql);
$email=$get[email_address];

echo 
' adding emails to textfile';
//adding emails to textfile
$fn "file.txt";
$file fopen($fn"a+");
$size filesize($fn);
$space.= "\n";
fwrite($file$get);
$text fread($file$size);
fwrite ($file$space);
fclose($file);
?>



now test it, i have uploaded it at hitcross.tk/a.php and is giving no error.

Ventic

still didnt worked to me

shall i give you in pm my smf_members file and send me later the file with mails?

Advertisement: