Delete all forum posts (vbulletin/php)

I am a user on a forum and now want to delete all posts I have made from that forum. I can manually goto each post, click edit, click delete, and delete the posts. However, this is not a pratical solution for a large number of posts (>5k).

I'm sure there must be a way using php to cycle through the posts if I have a list of the post/thread id's to systematically delete the posts.

The vbulletin forum code taken from the delete post bit looks like this:
<form class="vbform block" action="editpost.php?do=deletepost&amp;p=1387087" method="post">
	<h2 class="blockhead">Delete Post</h2>
	<div class="blockbody formcontrols">
		<h3 class="blocksubhead">Select the appropriate options and then click the <strong>Delete</strong> button.</h3>
		<div class="section">
			<div class="blockrow">
			<dl class="dep_group">
					<dt><label for="delete"><input type="checkbox" class="dep_ctrl" id="delete" name="dodelete" value="1" tabindex="1" /> Delete this post in the following manner:</label></dt>
					<dd id="delete_deps">
						<ul class="group checkradio">
								<dl class="group dep_group floatcontainer">
									<dt><label for="deltype_soft"><input type="radio" id="deltype_soft" checked="checked" class="dep_ctrl" name="deletepost" value="delete" tabindex="1" /> Delete Message</label></dt>
									<dd id="deltype_soft_deps">
										<input type="text" name="reason" class="textbox primary" value="" tabindex="1" />
	<div class="blockfoot actionbuttons">
		<div class="group">
			<input type="submit" class="button" value="Delete Post" tabindex="1" />
	<input type="hidden" name="s" value="" />
	<input type="hidden" name="securitytoken" value="1303979356-07f41ff782fe86f8f02350cd2d1a73d620a65ee3" />
	<input type="hidden" name="p" value="1387087" />
	<input type="hidden" name="url" value="" />
	<input type="hidden" name="do" value="deletepost" />

Open in new window

If I have both the thread id the post is in, and the post id itself for every post, can anyone think of a way to cycle through this list automatically deleting the posts by using the above code? Cheers :)

Who is Participating?
RossAuthor Commented:
Paid for a coder to develop a tool to do this for me.
Is the forum yours / do you have access to the mysql database?
For a large number like that I would think the easiest way would be a simple mysql query to remove all posts that match your userID.  I would highly recommend doing a backup first though if this is even an option for you.
RossAuthor Commented:
No I'm not - if I was it'd be easy like you say :)

I need a way to do this just with my regular forum rights. Any ideas?
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

not offhand, no.  Normal forum authentication and security will prevent you from carrying functions like that out.  All forums I know of will validate each of those requests by session / user authentication, which you wouldn't have since the script would not be running on the forum host server.

I would probably request assistance from a forum admin.  I know SMF for example has a standard admin option to remove a forum account along with all posts and threads associated with it.  Then if you still wanted an account there you could just re-create it.
RossAuthor Commented:
What about something like a vba action that fires a browser session to do it? That way we're already authenticated via the cookie? Can we pass the delete command in the URL on it's own?
Mohamed AbowardaSoftware EngineerCommented:
Since you don't have access to the database, it won't be as simple as it could be.

Create PHP cURL script to access the forum and delete each post for you.
RossAuthor Commented:
solutions posted here didn't address my issue - went to private coder.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.