Quickly Remove Images From Imagearn.com Galleries [php script]

As is typical of my work, this is quick and dirty but it gets the job done.  Use at your own risk.  However, it works great for me.

You’ll need a web server with PHP that has the curl extension installed.  By the way, my current browser is Chrome.

Make sure you’re logged into Imagearn.com when you use it.   Their login sessions last for 30 minutes or so, or if you close your browser, so verify before you run this script.  Nothing bad will happen if you’re not logged in at the time, only that the images you try to remove *won’t* be removed.

Note: this script can be tweaked in tons of ways, and I may get around to it, but don’t hold your breath.  Better off tweaking it yourself.

First, after logging into imagearn.com, go to Edit the gallery that has the images you want to remove.

Then click on Remove Images.

Right-click on that page somewhere and select “View Source” or your browser’s equivalent option.

Copy the page’s source code.

Now browse to the PHP script.

In the textarea field, paste the source code.

Click Submit.

(Sometimes I have to click it again.)

A vertical list of thumbnails and links will appear below the textarea field.  Middle-clicking either will immediately and permanently delete the related image by open up a properly formatted URL in a new background tab.

NOTE: You MUST MIDDLE-CLICK (open the links in a new tab) when clicking a thumbnail or the word ‘remove’.  The link target is not ‘_blank’, because if it was set to ‘_blank’ then the current page will lose focus, and the whole point of me making this would be defeated.  Middle-click opens them in a background tab (for me, at any rate).  This allows me to middle-click through, staying on the same page, and getting rid of images must faster than via the means provided by Imagearn.com which forces you to confirm the removal.  This is very time-consuming if you have alot of images to remove.

I had an enhanced script that would allow you to toggle a bunch of checkboxes at once from a point in the list, then use javascript to open a bunch of tabs with the correct links but the script disappeared from my local server (which is actually my motivation for putting this on the web).

<?php

foreach($_GET as $k => $v) {
	$$k = $_GET[$k];	
}

foreach($_POST as $k => $v) {
	$$k = $_POST[$k];	
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>remove from imagearn gallery</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <label>
    <textarea name="source" id="source" cols="100" rows="20"><?php print stripslashes($source); ?></textarea>
  </label>
  <label>
    <input type="submit" name="button" id="button" value="Submit" />
  </label>
  <input name="action" type="hidden" id="action" value="sbt" />
</form><br />
<br />
<?php 
if ($action == "sbt") {
	preg_match_all("|profile.php?o=remove_images&id=([0-9]+)&idimg=([0-9]+)"[^>]+>[^<]*<img src="([^"]+)"|i",stripslashes($source),$matches);
	foreach($matches[1] as $k => $v) {
		$thumb = $matches[3][$k];
		$f = $v;
		$s = $matches[2][$k];
		$rlink = "http://imagearn.com/profile.php?o=remove_images&id=$f&idimg=$s&yes=yes";
		echo "<a href="$rlink" style="font-size:54px"><img src="$thumb"> remove</a><br>";
	}
}
?>
</body>
</html>

Posted in Code, PHP, Tech, Web. No Comments »

Even Easier Ramen Noodles

One of my own discoveries.

1) Put ramen noodles in a large soup bowl (microwave-safe) with 2 cups of water.  Make sure you the noodles are completely submerged.  Might have to crunch them down a bit, depending on the size of your bowl.

2) Place bowl in microwave for 5 minutes (may have to play with the time, but 5 minutes is perfect for me).

3) Add seasoning and stir.  I’m gonna just say it to be safe:  bowl will be effin’ hot.

No waiting for a pot of water to boil, no having to clean said pot and you don’t have to worry about forgetting to turn off the stove.

You’re welcome.

Posted in Uncategorized. No Comments »

Uniden DECT 6.0 – Get Caller ID to Display a 1 In Front of The Number [RESOLVED]

I’ve been unable to simply press the TALK button while looking at the Caller ID on the phone to call someone back.

Uniden chose to display everything except the number 1 in front of a number.  I’ve never seen another Caller ID system do this.

So I called Uniden support and they solved the issue in 5 seconds (after being on hold for nearly an hour).
(more…)

PHP – Read/Parse an Exported Bookmarks File

Since I couldn’t find anything like this online, I thought it might help someone else.

(more…)

Posted in Code, PHP, Tech, Web. No Comments »

Re-reading Dune

I am an avid fan of the Frank Herbert Dune series.  (The spin-offs, the ones not written by Frank, are really just utter crap.  Irreverent assholes capitalizing on the work of a, dare I say, genius.)

The stories are epic.  They feature intelligent characters.  They are rife with ideas.  After I read them, I sought out and found, then read, more of Frank Herbert’s work.  Destination: Void.  Whipping Star. The Pandora series.  The Santoroga Barrier.  Hellstrom’s Hive. The Heaven Makers.  The Green Brain.  The Dosadi Experiment (<- really, honestly, very good).  et al.
But I’m poor and there’s nothing out there that appeals to me at the moment, so I’m re-reading Dune.  (Strange. I’m suddenly not that poor when an author I like releases a new work.)

However, I’m out of cash and books, so I’m re-reading Dune.

And since I read this ages ago, and have touted it wonders to anyone who would listen, and have watched every TV and movie version that has been released (with varying levels of dismay), I wanted to mention the scenes that I have no recollection of ever reading.

(more…)

Posted in Uncategorized. No Comments »

First!

To forestall hate-mail, I’m going to try to replace the posts that I had with my Drupal install.

Posted in Site News. No Comments »

Google Chrome: Fast, But Retarded

Here’s a list of some basic elements that I require that Chrome ignores/craps on.

(more…)

»