Thursday, September 20, 2012

Simple php email script

<?php
$to = 'somebody@gmail.com';
$subject = 'the subject';
$message = 'hello';
mail($to, $subject, $message);
?>

Wednesday, September 12, 2012

Google Face Detection Software

Face detection is becoming more common in still photographs but the technology has yet failed to support video footage. Google is looking to break into this brand of technology and has filed a patent application. The Google technology will use a series of video frames to generate clusters of facial representations which are associated with any person.

Google Face Detection Software

By understanding what someone looks like from any given angle, Google could then associate a name to whenever that person is recognised in a video clip. The technology is sophisticated enough to handle differences in lighting, shadows and faces at any conceivable angle.

The technology will offer an added option to YouTube, offering the ability to tag whoever appears in a single video. No more claiming the video where you ran naked through a crowd of people wasn't you - the technology will prove otherwise and tag you. Consider it a blessing or a curse, but the technology looks sure to be integrated into Google's products in the near future.

SOURCE: http://www.inventionreaction.com/

Monday, September 10, 2012

Simple php file upload

<form name="upload" method="post" action="" enctype="multipart/form-data">
            Image:<input type="file" name="image">
            <input type="submit" name="btnsubmit" value="Upload">
</form>
<?php
           if(isset($_POST['btnsubmit'])&& $_POST['btnsubmit']= = 'Upload')
           {
                   $image=$_FILES['image']['name'];
                   move_uploaded_file(['image']['tmp_name'],"uploads/".$image);
           }
?>


  • The enctype attribute of the <form> tag specifies which content-type to use when submitting the form. "multipart/form-data" is used when a form requires binary data, like the contents of a file, to be uploaded
  • The type="file" attribute of the <input> tag specifies that the input should be processed as a file. For example, when viewed in a browser, there will be a browse-button next to the input field.
  • move_uploaded_file  copies file to a folder called "uploads".

Thursday, September 6, 2012

How to change joomla admin login username & password


  1. Go to phpmyadmin
  2. On the left side of tables look for jos_users table & click it.
  3. On the data you want to change click on the edit icon(small pencil icon).
  4. Change the username you want to edit.
  5. For Editing the password choose MD5 on the drop down box at left side of password written then change the password you want.
  6. At the bottom then click Go button.


Now u are done.

If the above doesn't work. Follow the following steps:

SQL code (Sites running on Joomla 1.6.xx)
INSERT INTO `jos_users`
(`id`, `name`, `username`, `email`, `password`, `usertype`, `block`, `sendEmail`,
`registerDate`, `lastvisitDate`,`activation`,`params`)
VALUES ('40', 'Administrator2', 'admin', 'your-email@yourdomain.com',
'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199',
'Super Administrator', 0, 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00',"","");
INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`) VALUES (40, 8);
SQL code (Sites running on Joomla 1.5.xx)
INSERT INTO `jos_users`
(`id`, `name`, `username`, `email`, `password`, `usertype`, `block`, `sendEmail`,
`gid`, `registerDate`, `lastvisitDate`)
VALUES (NULL, 'Administrator2', ' admin ', 'your-email@yourdomain.com',
'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199',
'Super Administrator', 0, 1, 25, '0000-00-00 00:00:00', '0000-00-00 00:00:00');
INSERT INTO `jos_core_acl_aro` VALUES (NULL, 'users', LAST_INSERT_ID(), 0, 'Administrator2', 0);
INSERT INTO `jos_core_acl_groups_aro_map` VALUES (25, '', LAST_INSERT_ID());
NOTE: The above code has jos_ as the table name’s prefix (Joomla’s default table name prefix). If you changed this prefix when you first installed Joomla, you will need to change jos_ to the prefix that you used.
After inserting these statements, you’ll be able to log in to Joomla with these new login credentials:
Username: admin
Password: secret
After u login plz change the password or username through backend.