Archive for August, 2010

How to password protect your web directories the pro way.

http://www.elated.com/articles/password-protecting-your-pages-with-htaccess/

Great article, would read again.

Old people.

Screw all you useless, creepy, old people. If you fucked up at life, just admit it. There’s no point in douching yourself around us younger people because we all think you’re just as useless and creepy as everyone else your age.

How to make your web app post to someone’s facebook.

1. make a facebook application and get your appId, and secret.
2. get your user to login to facebook using the following code

<a href=https://www.facebook.com/login.php?api_key=YOUR_API_KEY&cancel_url=SomeRandomURL&display=page&fbconnect=1&next=ThePageYouWantFacebookToDirectUsersToAfterTheyLogin&req_perms=publish_stream&return_session=1&session_version=3&v=1.0″>
<img src=”http://scoops.widgets.rebelsites.com/images/connect_with_facebook.png” />
</a>

3. call this php code. don’t forget to include the facebook.php library… you can find it all over the internet. Probably best to get it directly from facebook’s gitHub.

$facebook = new Facebook(array(
‘appId’  => ‘YourAPPID‘,
‘secret’ => ‘YOURAPPSECRET‘,
‘cookie’ => true,
));
$facebookPostData = array(
‘message’ => ‘This is the message’,
‘picture’ => ”,
‘link’ => $this->session->userdata(‘donr’),
‘caption’ => ‘here is a small caption… I hope’,
‘description’ => ‘description wut?!?’,
‘source’ => ‘source goes here’
);
$facebook->api(‘/me/feed’, ‘post’, $facebookPostData);

5. ????

6. PROFIT

Return top