Hello There, Guest! Login Register
Logo
Dismiss this notice
MaDLeeTs is not responsible for any attacks that are carried out on networks, websites or servers.
MaDLeeTs staff members cannot be held responsible.
All information on this forum is for educational purposes only.


little sorting [PHP]

  • 0 Vote(s) - 0 Average


10-14-2014, 01:29 AM #1
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:812 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
little sorting script for emails coded by me Smiley1
it will create for each domain a new file at the directory emails wink
if the file is allready exist it will safe all other emails with the domain ending to the file Smiley1
PHP Code:
<?php
@set_time_limit(0);error_reporting(0);
if(!empty(
$_POST["emails"])){
    
$emails preg_split("/\r\n|\n|\r/",$_POST["emails"]);
    if (!
is_dir($dir)) {mkdir(getcwd() . '/emails/');}
    foreach(
$emails as $email){
        
$ends explode("@",$email);
        if(!empty(
$ends[1])){
        if(!
file_exists(getcwd() . '/emails/'.strtolower($ends[1]).'.txt')){file_put_contents(getcwd() . '/emails/'.strtolower($ends[1]).'.txt',"");}
        
file_put_contents(getcwd() . '/emails/'.strtolower($ends[1]).'.txt',file_get_contents(getcwd() . '/emails/'.strtolower($ends[1]).'.txt')."\n".$email);
        }
    }
}else{echo 
'Enter pleas your Emails here :<form method="POST"><textarea name="emails" style="width:40%;"  rows="25"></textarea><input type="submit" value="sort it"></form>';}
?>
give me some feedback

[Image: xodhvlpa.jpg]
[Image: test.php]

10-14-2014, 01:57 AM #2
yhi Offline MadLeets Vip ******
V.I.P
Posts:392 Threads:40 Joined:Mar 2013 Reputation: 14
Mood: Irritated
thxxxx Smiley1

10-14-2014, 02:12 AM #3
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:812 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
no problem you are welcome Smiley1

[Image: xodhvlpa.jpg]
[Image: test.php]

10-15-2014, 09:41 PM #4
MindCracker Offline Junior Administrator **********
Junior Administrator
Posts:364 Threads:116 Joined:Jun 2012 Reputation: 10
Mood: None
Thanks for Share ( I will send it to some one He was searching for it )

 =^..^=   =^..^=   =^..^=    =^..^=    =^..^=    =^..^=    =^..^=    =^..^=
As a wise Chinese man once said: �do not anger one who has root on your server�
 =^..^=   =^..^=   =^..^=    =^..^=    =^..^=    =^..^=    =^..^=    =^..^=

10-16-2014, 01:08 AM #5
SickSpawn Offline You have an error in your SQL syntax; ***
TeaM MaDLeeTs
Posts:85 Threads:28 Joined:Sep 2014 Reputation: 2
Mood: Hacker
is a very nice share bro Biggrinsmiley
good job.

[#] Twitter: sickspawnhy
[#] Jabber : [email protected]

10-16-2014, 01:22 AM #6
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:812 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
thanks wink

[Image: xodhvlpa.jpg]
[Image: test.php]






Forum Jump:


Users browsing this thread:1 Guest(s)