August 16th, 2009

Mass Delete Icons


I'm working on a simple script that will delete all of my user icons on LiveJournal.

Here is what I've got the script doing, and I'm not sure why it doesn't work: (For this example, I'll assume there is one icon, whose number is 9774058)

-Load editpics.bml
-Get the lj_form_auth
-Post the following data to editpics.bml:

The result is that the icons remain unchanged (this is true if I try other icon maintenance tasks, such as changing keywords or which is the default icon). I know the lj_form_auth is correct. And from viewing source I can see that if you check the delete box to delete an icon then the relevant data that gets posted is: delete_# with a value of 1 (where # is the icon number).

For what it's worth, I'm doing this in PHP using cURL. I didn't post my code because I think my problem is that there is some data that needs to be posted; I figured it was clearer this way.   I've also tried posting the form data for the icon's keywords and comments (along with the original values), but that had no noticeable effect.

If anyone can help, I'd appreciate it.