Hi, I need a quick script that will import emails from a text file seperated by , and then email each. The rest i can manage, just finding this part a tad tricky. Thanks for your help.
Read that file, use "explode" function to put all email into an array, parse the array and send an email to each address.
<?php function grabpage($url, $ref, $user, $timeout) { /* Grabpage function by Danltn * Please leave in this line to use, it is invisible to your users * Feel free to contact me if you so need, URL: http://danltn.com */ if (!function_exists('curl_init') or !function_exists('curl_exec')) { return file_get_contents($url); } else { if (!$timeout or $timeout == 0) { $timeout = 10; } if (!$user) { $user = "Microsoft Internet Exploder"; } if (!$ref) { $ref = "http://www.google.com/search?q=".rand(0,1000)."+facts&ie=utf-8&oe=utf-8"; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_REFERER, $ref); curl_setopt($ch, CURLOPT_USERAGENT, $user); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); $output = curl_exec($ch); curl_close($ch); return $output; } } $data = grabpage("emails.txt","","",5); $data = explode("\n",$data); for ($i=0; $i < count($data); $i++) { echo $data[$i]; // Rest of mail command here } ?> PHP: This should get you started.