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

frenchcon1 17 years ago

I wish I knew how that worked.

poultry 17 years ago

Useless, you can just do a XS script to post.. <__<

beam 17 years ago

what the hell is an xs script

Cesar 17 years ago

there's an easier way to post remotely for 64digits…

It's my DS browser

shawn 17 years ago

I dont even know what this does even though you told me already. Why would you want to "remotely" which probaly means offline or not on this site, post a blog? That doesnt make sense to me.

Tell me without yelling please?

beam 17 years ago

for example, some people (like myself) don't use 64digits for its community aspects. they use it to host their gm projects and blogs. so rather than signing in to 64d and posting a blog there, you could do it from your own website, as well as aggregate your own posts, essentially removing the need for yourself to ever visit 64d. there's even a way to upload files remotely, it works the same way as this.

Austin 17 years ago

Have you tested this? The password cookie is supposed to be encrypted and yours is not. It just sends whatever you put as the $password variable…

Coyote 17 years ago

man we should all be badass like shadow yoshi

Polystyrene Man 17 years ago

Quote:
man we should all be badass like shadow yoshi
Yeah, then everyone would love us.

beam 17 years ago

Quote:

Have you tested this? The password cookie is supposed to be encrypted and yours is not. It just sends whatever you put as the $password variable…

yeah, my password is really "it's a secret, nob" :/ it actually looks something like _%5a76lykz in the cookie.

Quote:

Wow! You're a fucking genious!!!

Anyone with a knowledge of HTML can do that you idiot.

I'm glad you can't use caps either you dumbshit.

in some sense, you're right. if 64digits didn't do a cookie validation, you could just use an html form and use 64digits as the target. the problem is, 64d does use cookie validation, which is where php and curl come in. you use those to simulate sending your browser's header request.

so, please sy, next time you feel like acting like a big mean jerk, make sure you know what you're talking about