Showing posts with label Others. Show all posts
Showing posts with label Others. Show all posts

Thursday, January 6, 2011

Sunday, January 2, 2011

How to send images as email content but not as an attachment.

Below is the process to send image as email content.

1. Open the image in internet explorer or google chrome browser or any other browser. Dont open in firefox. Also your image need to be in any live website (ex: flickr or photobucket etc..) coz you can't send from your computer.

2. Then right click on the image and select the option copy or copy_image

3. Then paste in your mail body. Thats it.

Thursday, August 19, 2010

Send mails from your domain

Your hosting provided need to create one mail server for your domain then only mails sent from your domain name like from : mail@mysite.com, otherwise some default mail server details displayed in mails header information.

To check is mail server set for your domain then run below commands at dos prompt.

ping smtp.mysite.com
and/or
ping mail.mysite.com

Wednesday, August 11, 2010

Cross domain data exchange

You can use XML language to transfer large data from one domain to other. Suppose domain-x wants to send data from its database to domain-y. Then domain-x will generate xml file for the database and send it to the domain-y via post method for security purpose. Upon receipt of xml file from domain-x, the domain-y will store that xml file in one folder and create one new row in received_xml table, and call a xmlparser script through cron job to extract information from the xml files and store in database and then move that parsed xml file to some other folder(named like parsed) and remove the record from receive_xml table.

For parsing there are so many free scripts available in php,ruby etc., xmltoarray is one of the technique.


Cron job commands to run shell script, ruby script and php script

Cron job commands to run different Scripts

Syntax:
Time to run - Command
[ Minute - Hour - Day - Month - Weekday ] - Command

Times pattern
* * * * * => Execute every minute
0 * * * * => Execute every Hour
0 0 * * * => Execute every mid-night
0 0 0 * * => Execute every Month
0 0 0 0 * => Execute every Weekday
*/5 * * * * => Execute every 2 minutes
0 */2 * * * => Execute two Hours

Commands can be broken down as
[PATH OF PHP] [ARGUMENTS] [PATH OF PHP SCRIPT]

######Run PHP Script#########
/usr/local/bin/php -q /home/tom/public_html/cron/maintenance.php

######Run Ruby Script#########
#Ruby cron job setting. Ruby will run cron jobs through script runner.
/usr/local/bin/ruby /home/inkkdds1/inkakinada/script/runner /home/inkkdds1/inkakinada/app/cron_job_database.rb
#ruby-path script-runner-path ruby-file-path

######Run Shell Script#########
cd /home/devinka/public_html/spocosy/ && sh cron.xmlParse.sh
#cd to application-path && sh shell-script-path


Linux Shell Scripting Secrets

Thursday, August 5, 2010

URL push and URL pull to send / retrieve information between cross domains

Hello friend,
Today I have done a small but very useful functionality i.e URL push and URL pull means you can send information to remote url and retieve information from other url. Getting information is easy and i think all developers know it, but sending information is little tricky when we don't know how the post variable names.
Below is the code to track the post parameter names and values in targetsite.
//extract($_POST);
foreach($_POST as $key=>$value)
{
echo $key.'='.$value.'
';
}
echo $_SERVER['HTTP_REFERER'];
/*Output:
key = value
key = value
etc..,
http://from-site-name.com/filename
*/
?>
So here in foreach loop you will get the post param names and values. So you can store in db with table structure as id autoincrement, key, value, referrer,posted_on. OR use xml file to store the information in structured way like valuevalueetc..,

Ex: http://formsite-name.com/postinfo.php
##################################################################
form action="http://targetsite.com/getvalues.php" method="post"
Name:input type="text" name="name"
Address:input type="text" name="address"
Email:input type="text" name="email"
input type="submit" value="Submit"
/form
#####################################################################

When user submits the above form the remote script (i.e mentioned in form action will execute) here it is at http://targetsite.com/getvalues.php
//extract($_POST);
foreach($_POST as $key=>$value)
{
echo $key.'='.$value.'
';
}
echo $_SERVER['HTTP_REFERER'];
/*Output:
name = postedname
address = postedaddress
email = postedemail
http://formsite-name.com/postinfo.php
*/
?>

Friday, July 30, 2010

About Foxycart

Foxycart is a third party service which offer ecommerce solution for your products by just creating account in foxycart and small configurations. After that we should integrate simple form in our own application and submit product details to the foxycart. Then it will take care of the checkout and payment process and send back the transaction details as xml datafeed. And logged all errors and complete information, so that we can see them through foxycart admin section by login and can maintain multiple stores.
Features list: http://www.foxycart.com/features-of-web-20-seo-ecommerce.htm

Thursday, July 29, 2010

Detect website virus using firefug

Hi Friends,

If your website get attacked with virus, then you can detect it using the firefox's firebug addon. The common virus attack on websites are adding some unnecessary scripts or iframes within your source code. You can open the site and open the firebug and click on net tab. It will show the un related code in red color with border as show in the below image



Wednesday, July 28, 2010

Xcloner - For backup and restore Joomla, Drupal, Wordpress and All PHP/Mysql Websites

Hellow friends,

Xcloner is a tool to backup and restore feature for Joomla, Dupal, Wordpress and all PHP/Mysql Projects. You should should like xcloner for wordpress etc., in google for more info.

For Wordpress
http://www.devplug.net/

For Joomla
http://www.joomlaplug.com/Documentation/XCloner_Documentation/XCloner_-_Standalone_Backup_and_Restore.html

Saturday, July 24, 2010

Wordpress Vs Drupal

Hi, here is my view about where to use wordpress and where to use drupal.

Wordpress
# If your application doesn't contain so many dynamic content forms and have to manage some static pages of information and need a bloging system.

It should suitable company portfolio sites and simple to medium level websites.

Drupal
# If you have multiple dynamic content types (press releases, news articles, blog posts, etc.). Drupal is great at allowing you to create this stuff on the fly, with Wordpress you are hacking things together.
# If your site has more than a two template design structure (homepage and second levels).
# If you have numerous content blocks on the homepage or in sidebars that you will be editing frequently. Drupal’s block system is great at this kind of stuff.
# If you are trying to start small and expect your site to add tons of features/content moving forward.
It should suitable for complex websites which involves so many modules.

How to get driving licence in Andhra Pradesh

The procedure to obtain a Driving License is simple. Follow the below mentioned steps.

Normally this is the process in any State across India. Well, Few Road Transport Authorities (RTA's) could be working as per the local governments periodic regulations.

1. Buy the Learning Licence Forms. These are Form 2, Form 1 & Form 1A(Form 1A is for people aged above

40 years and also depends if your RTA needs it). These forms are available in single click at www.drivingtest.in. Copy or Click the following link and try.

http://drivingtest.in/rta-forms.php

2. Once you are done with filling up of forms, find out with the Road Transport Authoritie’s office, if you have to book a slot for your learners license test. In Andhra Pradesh, one has to book the slot and then practice the questions to clear the test. In Andhra Pradesh the slot can be booked at the link below.

Visit :-

http://www.delhi.gov.in/wps/wcm/connect/doit_transport/Transport/Home/Driving+Licence/Learner+Licence(For Delhi)

http://rto.kar.nic.in/ (click on 'online appointment for LL' for Karnataka)

http://cfst.co.in/cfstonline/LL/TestCenter.aspx (for Andhra Pradesh only)

3. Once the slot is booked, you need to prepare for the online learners licence test which comprises of 20 questions (For Andhra Pradesh). In other cases, walk in to RTA office and pay fee and wait for your turn. The passing mark is 16 where each question carries 1 mark for AP. The number of questions may vary from State to State, however, the questions in this website are the ones normally in the syllabus. In order to practice online you may visit the following link. There are about 250 questions in this website and 10 are free sample learners licence questions. Register to access all the Driving Licence questions.

http://www.drivingtest.in/online-driving-license-sample-test.php

4. To get a hint on the road signs and the traffic signs go to

For knowing all the Traffic Signs http://www.drivingtest.in/road-signs.php

To know about driving tips etc http://www.drivingtest.in/resources.php

5. Once you clear your learners license, you may book a slot for the permanent licence (This is in case of Andhra Pradesh) on the same website as stated above. For other states call the RTA office to find out the availability
of track to be tested for the permanent License. While learning to drive a two wheeler or a four wheeler, kindly keep the road safety and its structure in mind. Read the signs in practical driving test carefully. For further driving tips click on the following links.

http://www.drivingtest.in/driving-tips.php

http://www.drivingtest.in/road-marking.php

http://www.drivingtest.in/offences-penalties.php

Tuesday, July 20, 2010

Enable SSH access for you shared hosting account in godaddy server

To Enable SSH on Your Linux Shared Hosting Account
1. Log in to your Account Manager.
2. From the Products section, click Web Hosting.
3. Next to the hosting account you want to use, click Launch.
4. In the Settings section of the Hosting Control Center, click the SSH icon.
5. Type your Country Code, Phone Number, and Extension (if applicable) in the corresponding fields and click Enable.

NOTE: SSH requires a strong password. If prompted to change your password, click Change Password, type a new password, and click OK.
6. We call the phone number provided within 10 minutes. Once the connection is established, an automated message plays a message containing a PIN. Type the PIN number into the You will be called with your PIN field and click Verify.
Once verified, it may take 24-72 hours for SSH to be enabled for your account. During this time, you are locked out from the account as it is moved to a new server.

Thursday, July 15, 2010

PHP For Android

Hi Friends,
PHP For Android project was launched recently and the complete information available in phpclasses.org site in the form of interview with the inventor. The information url: http://www.phpclasses.org/blog/post/125-Developing-PHP-applications-to-run-natively-on-Android-phones.html

Wednesday, July 14, 2010

Free online php code encryption

If you want to encrypt your source to avoid others to modify your code and stealth your code try this one.
http://www.byterun.com/free-php-encoder.php

Agile method in software development

Agile method is nothing but building software with incremental or interactive work strategies known as sprits i.e building application by involving number of people or teams and push the work into public when considerable amount of work done. And can be able to roll back to any previous version of the application if found any thing wrong or unhappy with the new version of the appliction when some one or team push their work recently.

This approach is the better one when compare to waterfall, or traditional sequential development.In older days A project could be developed much like an automobile on an assembly line, in which each piece is added in sequential phases. This means that every phase of the project must be completed before the next phase can begin. Thus, developers first gather all of a project's requirements, then complete all of its architecture and design, then write all of the code, and so on.

In this scenario, If any thing went wrong in the development stage, can't revert it back and company has spent time and money to create a software that no one wants.

Whereas agile methodology helps a lot to the interactive development mode.

Build IPhone native appliactions with PHP or Ruby code

If you wanna develop IPhone native applications and don't have the time to learn completely new language i.e Objective - C, Now it is possible for the PHP and Ruby developers. By using one third party service you can write code in either PHP or Ruby and build native IPhone application also can use Html and CSS for UI Design.

You can download the source from here : http://www.appcelerator.com/

Other available tools to develop Iphone and wap applications.

Wednesday, July 7, 2010

Website optimization

Hi Friends,
Below urls are very useful for website optimization techniques.

http://www.fiftyfoureleven.com/weblog/web-development/css/css-sprites-images-optimization
http://www.peachpit.com/articles/article.aspx?p=447210
http://www.die.net/musings/page_load_time/
http://www.webdevelopment2.com/easily-increase-page-load-time-10-fold-jquery/

CSS Sprites -

If your web page had lot of images and it will take more time to load all images then you should use one technique called "CSS Sprites" which will load all your common UI images in one request so that your page loads much faster than ever before.

Another technique is place the below tag in head section of your page

Use Firebug and Yslow plugins for Firefox to know the performancd of the page load

Use Firebug for Firefox from a realistic net connection to see a graphical timeline of what it is doing during a page load. This shows where Firefox has to wait for one HTTP request to complete before starting the next one and how page load time increases with each object loaded. YSlow extends Firebug to offer tips on how to improve your site's performance

Access the website with ip address and username instead of doman name when dns was not propagated correctly

After uploded files to hosting server, you need to set the dns to access files with domain name, if you didn't set the dns, you can also call the application as below.

http://ip-address/~username/gallery/ OR http://ip-address/username/gallery/
Ex: http://192.168.12.10/~venkat/gallery/