Posts Tagged ‘php’

How to programmatically create and log in drupal users

Creating a new user is very easy in Drupal 6. Here’s how. <p>> <p>$new_user = array(</p> <p>&#8216;name&#8217; => $username,<br /> &#8216;mail&#8217; => $mail,<br /> &#8216;pass&#8217; => user_password(),<br /> &#8216;status&#8217; => 1,<br /> &#8216;auth_MODULENAME&#8217; => $username<br />)</p> <p>$user = user_save(NULL,$new_user)</p> <p>// log the user in</p> <p>$user = user_authenticate($new_user)</p> <p> Now for the explanation. We create a [...]

Pirate tweet

September 19 is International Talk Like a Pirate Day.For this day, the Yahoo! Query Language (YQL) team announced on the YDN blog that they were bringing out a “pirate table”. This table would allow us to translate plain English to piratespeak using YQL. I had been meaning to play around with YQL a bit and [...]

Intel 8085 microprocessor simulator

My friend Arun created an Intel 8085 microprocessor simulator as a hobby project sometime in his college. It’s written with php and javascript. Check out http://labs.kitiyo.com/8085