Posted Mon, 05/31/2010 - 20:58 by sheetal
1. Read user IP address.
var ip = '<!--#echo var="REMOTE_ADDR"-->'
2. Enter list of allowed ips
var allowed_ips = ["11.11.11.11","22.22.22.22"]
3. Create a regular expression string.
var handleips = allowed_ips.join("|")
handleips = new RegExp(handleips, "i")
Posted Mon, 05/31/2010 - 20:57 by sheetal
1. First create a instance of smtp server.
$smtp_server = fsockopen("smtp.yourdomain.com", 25, $errno, $errstr, 30);
2. Check for errors while connecting to mail server.
if(!$smtp_server)
{
// We have an error, do something
exit;
}
Posted Mon, 05/31/2010 - 20:55 by sheetal
Goto terminal and type
sudo gem install mongrel
cd application_folder
mongrel_rails start -d -p 8000 -a abc.com
First line will install mongrel server, then go inside your application folder.
Third line will start your mongrel server on port 8000. Now you can access your application on
http://abc.com:8000/controller_name
Posted Mon, 05/31/2010 - 20:39 by sheetal
Following is a small howto for doing a setup of Drupal. You can find more details on
http://drupal.org/handbooks
1. Download drupal and move the folder in /var/www/
2. Grant write permissions on configuration file
chmod o+w sites/default/
3. Create database in mysql
mysqladmin -u root -p create databasename
create username and password for accessing the database