remote posting to 64d

Posted by beam on Dec. 3, 2007, 4:08 p.m.

here's how to remotely post on your 64d blog. since my blog reader was rendered useless by rss, maybe this will go over a little better

<form method="post" action="post.php">
	<input type="text" name="title" />
	<br />
	<textarea name="entry" rows="5" cols="30"></textarea>
	<br />
	<input type="checkbox" name="show_recent" />
	<br />
	<input type="submit" name="submit" />
</form>

<?php
// force exit when no post data
if (empty($_POST['submit'])) exit;

// your 64digits username and password
$username = "beam";
$password = "its a secret, nob";

// the request url
$request_url = sprintf("<a rel="nofollow" href="http://64digits.com/users/index.php?userid=%s&cmd=insert_blog&id=">http://64digits.com/users/index.php?userid=%s&cmd=insert_blog&id=</a>", urlencode($username));

// post fields are title, entry, and show_recent
$request_data = http_build_query(
	array(
		'title'			=> $_POST['title'],
		'entry'			=> $_POST['entry'],
		'show_recent'	=> $_POST['show_recent']
	)
);

// post to 64digits, ya bitch
$ch = curl_init($request_url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Cookie: 64du=$username ;64dp=$password"));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);

// echo the result
if (stripos($result, "class="ms_aprove_msg_font"") === FALSE)
	echo "Blog entry not successfully posted.";
else
	echo "Blog entry successfully posted.";
?>

that is the bare necessity. the only thing you need to do is fill in your 64d username and password. the only problem is that your password is encoded, so you'll have to go into your cookies to find it. it's under the domain .64digits.com, and the cookie name is 64dp. it'll look like a jumble, but it'll work.

i hope i don't get in trouble for this

Comments

PY 17 years ago

Yus. Teh 1Nt3rN3tS is serus plaice.

PY 17 years ago

But srsly, blog reader? We need a 64Blog reader, fully endorsed by the staff, so they don't break it unknowingly. It would hover on your desktop, and be partially transparent until you clicked on it, and… yeah. A man can dream…

Grand-High Gamer 17 years ago

SY, stop being a fucking troll for no particular reason.

shawn 17 years ago

you're fighting a lost fight

Quote: SY
Which is why half the staff is on my friends list
Not for long if you keep attacking people like that.

firestormx 17 years ago

Quote:
You realize this could be used to spam the site with blogs, right? Since it doesn't have integrated date control?
You can spam blogs, but when it's being posted, it has date control before it is placed in the database to prevent it from spamming the front page. Unless he codes a script that can insert it directly into our database, it should be fine.

And SY, calm down. It's a script that does a task that requires PHP. It can be a useful tool in ways that Beam has already sugested. 64D was created to help people promote and spread their games, via their blogs and files managers, so if this helps Beam spread his blogs, it's not a bad thing.

Coyote 17 years ago

Quote:
You all are idiots. I don't go off insulting people for no reason.

1. You insulting beam and calling him a dumbshit is the reason for this nonsense

2. you just called everybody an idiot