Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Hi, I am starting an mailinglist for my members but I don't want all members to have to sign up for it.
How can I dump the e-mail addresses in the ubbthreads database to the screen, to a CSV or txt file so I can import it into the mailinglist?
I tried myphpadmin but I was only able to dump all user data, and I just need the e-mail addresses.

Regards,

Ron.


Those who fail to read ask many questions:-)
Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
That would be a good thing to request for 6.1, due to all the changes being made for the emailing members function. Just have it print out the list of members who haven't opted out.


- Allen wavey
- What Drives You?
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Dump the hole table with phpmyadmin and open the csv-file in Excel. You can delete the unwanted columns easily and save the file in csv-format again.

Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
I tried that but then you get a lot of garbage in your list.


Those who fail to read ask many questions:-)
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
what kind of garbage?

Sponsored Links
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Well, when I tried and erased all other fiels, in the e-mail field sometimes was the loaction of the member or one of my optional fields. I guess the fields where not seperated properly by excel.

Regards,

Toxic[Q]


Those who fail to read ask many questions:-)
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
I'm attaching a simple PHP script for dumping all the email addresses to a text file, one address per line.

If you need it tweaked slightly, let me know.

Edit: updated attachment to fix typo.
Attachments
53327-dump_emails.zip (0 Bytes, 13 downloads)

Last edited by Dave_L; 10/11/2002 3:40 AM.
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thanks Dave, might make a nice small modification once any tweaks are finished


- Allen wavey
- What Drives You?
Joined: Apr 2002
Posts: 141
Member
Member
Offline
Joined: Apr 2002
Posts: 141
Cool! Thx!


Those who fail to read ask many questions:-)
Joined: Jan 2001
Posts: 62
Journeyman
Journeyman
Offline
Joined: Jan 2001
Posts: 62
Hi there,

I installed the script on my server in the same directory where my IIP index.php script is located.

how do I execute it so that it creates the email list?

I tried accessing in my browser with http://.... but I get an error that it can't fopen(email_list.txt, 'w') or something like that.

am I doing something wrong.

is there not an easier way of exporting names and email addresses so I can do email broadcasting from my newsletter program?

thanks,

KC

[]Dave_L said:
I'm attaching a simple PHP script for dumping all the email addresses to a text file, one address per line.

If you need it tweaked slightly, let me know. <img src="/threads/php/images/graemlins/smile.gif" alt="" />

Edit: updated attachment to fix typo. [/]

Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
It's probably a permissions problem. Try creating the file email_list.txt ahead of time, and ensure that its permissions are set so that it's writable by the script.

Don't leave the email_list.txt file there, because anyone can read it from a browser.

A safer method would be to locate the file outside the web root, and put the full path in the line:
Code
$output_file = 'email_list.txt';



Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)