Javascript Event Log ~ Console
April 15, 2009 at 5:18 pm | In Js/Ajax | 1 CommentTags: ajax, javascript, javascript console, javascript tracker, js console, js event log, js event tracker, onclick event tracker
- /*
- Below is the function where to call console()
- */
- window.document.onclick = function(){ console(window.event.target.onclick) };
- function console(msg)
- {
- mywin = window.open(”, ’console’, ’width=500,height=150,left=800,top=800,scrollbars=yes,location=no’);
- if (mywin && msg!=null)
- mywin.focus();
- mywin.document.title=’Javascript Console…’;
- //mywin.document.writeln(‘<h4>Javascript Log here..</h4>’);
- if(msg!=null)
- mywin.document.writeln(‘<div style=”font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; border-bottom: 1px dotted #FFB64A; padding:4px;”>’+msg+’</div>’);
- //mywin.document.writeln(“<br /><a href=\”javascript:void(0)\” onclick=\”this.document.write=”;\” >Clear</a>”);
- //sleep(10); mywin.blur();
- }
Configuring/Creating Applications with Amazon EC2 and S3
April 13, 2009 at 1:43 pm | In Amazon Ec2 | 3 CommentsTags: ec2, ppk, s3, Amazon Ec2, Cloud Computing, Configure Applications with Amazon EC2 and S3, Creating Applications with Amazon EC2 and S3, Putty, winscp, ec2 public key, ec2 private key, aws
To create applications with the Amazon Elastic Compute Cloud (Amazon EC2), you do four things.
First you create an Amazon Machine Image (AMI) to package all your software into one image — your operating system, configuration settings, applications, and libraries. The AMI contains all the information you need to boot instances of your software.
Second, you upload this AMI for storage in the Amazon S3 (Amazon Simple Storage Service) service. Once in the storage, the AMI is available that you can securely access the AMI .Youíll need access to SSH client to talk to the S3.
Third, you register your AMI with Amazon EC2. You will get a unique number (ID) for it.
Fourth you use this AMI ID and the Amazon EC2 web service APIs to run, monitor, and terminate one or more instances of this AMI. We will tell you how to work with the command line tools and Java libraries later in this article. You must have Java version 5 or later installed to use the tools. You pay only for what you use. There is no minimum fee.
Interfaces to the web service APIs for other programming languages, including Perl, Python and Ruby will be available at a future date. Signing up for Amazon S3 and Amazon E2 If you already have an Amazon S3 account, skip this section.
To sign up, go to the Amazon S3 home page.Then in the Signup for AWS block on the upper right corner, click on a hyperlink to signup.
After following online instructions, you submit to create Amazon Web Services account. The AWS then sends you an email about your new account. In the email you receive, you will be directed to click on an URL.
You will find AWS Access Key Identifiers on the web page. Be sure to copy your AWS accountís Access Key ID and Secret Access Key and put them in a secure place. You will need them to bundle you own image. To sign up your AWS account for the Amazon EC2 service, log into your AWS account and then follow the link to Amazon EC2 in the Infrastructure Services section in the left panel.Click Your Web Services Account button at the upper right corner to bring down a menu of choices.
Select ìAWS Access Identifiers.î Go to the ìX.509 Certificateî section and then click the Create New button to create a new certificate or the Upload button to upload your own certificate.
You can only have one certificate associated with your AWS account. You must download your Private Key file, and store it in a secure location. AWS does not store your private key information. You will not be able to download the Private Key file at any other time. If you do not download now or you lose the Private Key file, you will have to create a new certificate and private key. After downloading your private key file, you must download your certificate file. You will need both files when you set up command-line tools. Getting the Command Line tools If you already have the tools, skip this section.
First, get the Command Line tools from the Amazon EC2 Resource Center and then unzip the file.
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351&categoryID=88
Second, set the environmental variable to locate the Command Line tools like this:
$ export EC2_HOME=<path-to-tools>
C:\> set EC2_HOME=<path-to-tools>
The variable is set to the path of the directory into which the command line tools were unzipped. The directory is named in the format of ec2-api-tools-A.B-rrrr and contains sub-directories named bin and lib
Third, add the bin subdirectory like this:
$ export PATH=$PATH:$EC2_Home/bin
C:> set PATH=%PATH%;%ec2_HOME%\bin
You need to identify yourself to the command line tools so they know which credentials to use for requests. First, set the variable EC2_PRIVATE_KEY to
reference your private key file like this:
$ export EC2_PRIVATE_KEY=~/.ec2/<your-private-key>
C:> set EC2_PRIVATE_KEY=c:\ec2\<your-private-key>
To find your private key, right click on the file and then click Properties and copy the information. The file ends with the .pem extension. Second, set the variable EC2_CERT to reference to your X509 certificate. Here is an example:
$ export EC2_CERT=~/.ec2/<your-cert>
C:> set EC2_CERT=c:\ec2\<your-cert>
To find your certificate number, right click on the file and then click Properties and copy the information. The file ends with the .pem extension. Running one or more instances Before you begin, make sure you have the following environmental variables correctly set up:
JAVA_HOME
EC2_HOME
EC2_PRIVATE_KEY
EC2_CERT Step
Launching an instance
If you have not found a public AMI and not generated a keypair you need to launch an instance, skip to step 4:
To launch an instance of the AMI ID, type:
PROMPT> ec2-run-instances <ami-identifier> -k gsg keypair
In the output you will get an instance identifier, the value immediately next to the INSTANCE tag, like this:
INSTANCE i-10a64379 ami-5bae4b32 pending gsg-keypair
You use the identifier to manipulate this instance (including terminating it when you are done). Once you launch an instance, you will be billed per hour for CPU time. If you leave this how-to article any time, make sure you terminate any instance you have started. To terminate the instances go to the Finishing Up section. It’s a good idea to check how the instance is doing. Wait a few minutes and then do the following:
PROMPT> ec2-describe-instances <instance-identifier>
In the output you will see next to the INSTANCE TAG the instance and AMI identifiers and then the instanceís DSN name (hostname). You will see the instance state just before the keypair name read ërunningí indicating the instance has been set up and has started running. Here is a sample output:
INSTANCE i-10a64379 ami-5bae4b32 domU-12-34-31-00-00-05.usma1.compute.amazonaws.com running gsg-keypair
There may be still a short time before the instance is accessible over the network.
Step 2: Authorizing Network Access to Your Instances Before you reach your instance over the internet, authorize traffic to it like this:
PROMPT> ec2-authorize default -p 22 PROMPT> ec2-authorize default -p 80
The first command authorizes network access instances in your default group on the standard ssh port (22). The second command opens up the standard http port (80). For details on controlled network security groups, see the Amazon EC2 Developer Guide.
Step 3: Connecting to your instance Open your web browser and go to the instance hostname indicated in the first step in the output of the ec2-describe-instances.
If the website times out, your instance may not have finished starting up yet. Wait a few minutes and then try again. Login as root and exercise full control over this instance.
PROMPT> ssh -i id_rsa-gsg-keypair root@<instance-host-name>
Your machine may have a different name for the sshcommand or use different command line options. Consult the documentation for your machine. When you are done, skip to the next section on creating one or more images.
Step 4: Finding an AMI To run an instance, you must find a suitable AMI to run.
At the prompt enter: PROMPT> ec2-describe-images
This will give you all public and private AMIs. In the output, look for the line containing the public image identified by the
ec2-public-images/getting-started.manifest.xml
value in the third column for one of the IMAGE tags. The value in the second column is the AMI ID for the same IMAGE tag.
Step 5: Generating a Keypair
Use a public/private keypair to ensure that only you will have access. One half of this keypair will be embedded into your instance to allow you login securely without a password using the other half of the keypair. Every keypair you generate requires a name, such as gsg-keypair like this: PROMPT> ec2-add-keypair gsg-keypair
You need to save the private key returned in a local file named id_rsa-gsg-keypair. Make sure you include ——BEGIN RSA PRIVATE KEY—— at the top and ——END RSA PRIVATE KEY—– at the bottom. If you do not put this file in your current directory, you should specify the full path when using the ssh command. If you are using OpenSSH, set the permissions of this file so you are the only one who can read it. Here is an example:
$ chmod 600 id_rsa-gsg-keypair; ls -l id_rsa-gsg-keypair (This is very important that change the permission)
Return to the first step to complete the process.
Creating one or more images.
You can create custom AMIs (private) and use them to launch as many instances as you need. You can take a look at the other public AMIs that are far better suited to basing the new AMIs.
Step 1: Modify an existing image Modify an image on the main web page by replacing some of the static content with your name to personalize it like this:
# sed -i -e ’s/Congratulations!/Congratulations<your-name>!/’ /var/www/html/index.html
You can confirm date and time of the file update like this:
# ls -l /var/www/html/index.html
# date
Here is a sample output for the ls command:
-rw-rw-r– 1 root root 1872 Jun 21 09:33 /var/www/html/index.html
The date and time in the output of the ls command should match the output of the date command.
Step 2: Bundling Copy your private key to the machine being bundled. You do not need the certificate:
PROMPT> scp -i id_rsa-gsg-keypair <your-private-key> root@<instance-host-name>
Bundle your image using your AWS account ID as your username.
# ec2-bundle-vol -d /mnt -k ~root/<your-private-key> -u <your-AWS-account-id>-s 1536
Confirm all necessary manifest file and image parts are found in the /mnt directory:
# ls -l /mnt/image.*
Step 3: Uploading to Amazon S3 Upload the bundle to S3 like this:
# ec2-upload-bundle -b <your-s3-bucket> -m /mnt/image.manifest.xml -a <aws-access-key-id> -s <aws-secret-access-key>
You will get continuous feedback until the upload has completed.
Step 4: Registering the AMI You must register with Amazon EC2, so you can locate it and run instances based on it. Do the folowing:
PROMPT> ec2-register <your-s3-bucket> /image.manifest.xml
In the output, you will get an AMI identifier, the value next to the IMAGE tag.
Step 5: Running instances Run the instances as follows:
PROMPT> ec2-run-instances <ami-identifier>
In the output, you will get an instance identifier, the value next to the INSTANCE tag. Here is a sample output:
INSTANCE i-10a64379 ami-5bae4b32 pending
Finishing up
First, deregister your AMI like this:
PROMPT> ec2-register <ami-identifier>
Second, delete your AMI with the following command:
PROMPT> ec2-delete-bundle -b <your-s3-bucket> -p image -a <aws-access-key-id>-s <aws-secret-access-key>
Third, terminate your instances.
PROMPT> ec2-terminate-instances <instance-identifier>
Wait a few minutes for the instance to terminate because you need to clean up your data. Check on the status of the instance as done in the first step in the Running one or more instances section. You can also terminate your instances by logging onto the instances with your ssh tool and running the shutdown -h command. If you forgot to include the -h option, you will put your instance into single user mode.
Application examples
Here are two examples – one using a public image and the other using a private image.
Example 1: Using a public image assuming a keypair has been generated
PROMPT> ec2-run-instances <ami-identifier> -k gsg keypair
PROMPT> ec2-describe-instances <instance-identifier>
PROMPT> ec2-authorize default -p 22
PROMPT> ec2-authorize default -p 80
PROMPT> ssh -i id_rsa-gsg-keypair root@<instance-host-name>
Example 2: Creating and using a private image
# sed -i -e 's/Congratulations!/Congratulations<your-name>!/' /var/www/html/index.html
# ls -l /var/www/html/index.html
# date
PROMPT> scp -i id_rsa-gsg-keypair <your-private-key> <instance-host-name>
# ec2-bundle-vol -d /mnt -k ~root/<your-private-key> -u <your-AWS-account-id>-s 1536
# ls -l /mnt/image.*
# ec2-upload-bundle -b <your-s3-bucket> -m /mnt/image.manifest.xml -a <aws-access-key-id> -s <aws-secret-access-key>
PROMPT> ec2-register <your-s3-bucket> /image.manifest.xml
PROMPT> ec2-run-instances <ami-identifier>
PROMPT> ec2-describe-instances <instance-identifier>
PROMPT> ec2-authorize default -p 22
PROMPT> ec2-authorize default -p 80
PROMPT> ssh -i id_rsa-gsg-keypair root@<instance-host-name>
Using PuTTY
PuTTY is a free SSH client for Windows. PuTTY also comes with PuTTYgen, a key generation program, and pscp, a secure copy command line tool.
To convert your private key to PuTTy format, do the following:
Step 1: Launch PuTTYgen and load id_rsa-gsg-keypair (see step 5 in the Running one or more instances section). The private key file must end with a newline character.
Step 2. Save the key as id_rsa-gs-keypair.ppk.
To use SSH with PuTTY, do the following:
Step 3. Run PuTTY and go to Connection -> SSH -> Auth.
Step 4. Under Authentication parameters click on Browse… and select the PuTTY private key file you generated in step 2.
Step 5. Under session fill in your EC2 instance host name or IP address.
Step 6. Click on Open to connect to your EC2 instance.
To use SCP with PuTTY, do the following:
Step 7. Use the scp command to copy the private key and X.509 certificate as shown in step 2 on Creating one or more images section.
Step 8. Run the same command with pscp like this:
C:\> pscp -i id_rsa-gsg-keypair.ppk <your-private-key> <your-certificate>root@<instance host name>
Don’t Reload popup window When main window is reload
April 12, 2009 at 2:19 am | In Js/Ajax | Leave a CommentTags: child window donot reload, Don't Reload popup, Js, Moving from one page to another do not reload popup, Popup not reload, Reload Parent, when Parent window reload child window do not reload
function popupmat()
{
var mylink=’http://lalit241.wordpress.com’
var windowname=’lalit241′
var refocus=true;
var mywin, href;
if (typeof(mylink) == ’string’)
href=mylink;
else
href=mylink.href;
mywin = window.open(”, windowname, ‘width=400,height=200,scrollbars=yes’);
// if we just opened the window
if (
mywin.closed ||
(! mywin.document.URL) ||
(mywin.document.URL.indexOf(“about”) == 0)
)
mywin.location=href;
else if (refocus)
mywin.focus();
return false;
}
Epassporte Payment Gateway Integration
April 10, 2009 at 2:24 am | In Payment Gateway | Leave a CommentTags: epassporte integration, epassporte payment, epassporte payment gateway, epassporte payment gateway integration, epassporte payment gateway integration with api
Sample code for HTML pages:
For Epassporte Integration Two Field Necessary That Provided By Epassporte To The Mearchant
acct_num
pi_code
pi_code is generated according to account number other wise you face xml apt error
<FORM ACTION=”https://www.epassporte.com/secure/eppurchase.cgi” TARGET=”NEW” METHOD=”POST”><BR>
<INPUT TYPE=”HIDDEN” NAME=”acct_num” VALUE=”[account number here]“><BR>
<INPUT TYPE=”HIDDEN” NAME=”pi_code” VALUE=”[product code here]“><BR>
<INPUT TYPE=”HIDDEN” NAME=”gohere” VALUE=”CART”><BR>
<INPUT TYPE=”HIDDEN” NAME=”dothis” VALUE=”VIEW_ITEMS”><BR>
<INPUT TYPE=”SUBMIT” VALUE=”View Cart Items” ALT=”View Cart Items”><BR>
</FORM>
Sample code for HTML pages (with quantity):
<FORM ACTION=”https://www.epassporte.com/secure/eppurchase.cgi” TARGET=”NEW” METHOD=”POST”><BR>
<INPUT TYPE=”HIDDEN” NAME=”acct_num” VALUE=”[account number here]“><BR>
<INPUT TYPE=”HIDDEN” NAME=”pi_code” VALUE=”[product code here]“><BR>
<INPUT TYPE=”HIDDEN” NAME=”amount” VALUE=”[product amount here]“><BR>
<INPUT TYPE=”HIDDEN” NAME=”product_name” VALUE=”[product desc here]“><BR>
<INPUT TYPE=”HIDDEN” NAME=”quantity” VALUE=”[product quantity here]“><BR>
<INPUT TYPE=”HIDDEN” NAME=”gohere” VALUE=”CART”><BR>
<INPUT TYPE=”HIDDEN” NAME=”dothis” VALUE=”ADD_ITEM”><BR>
<INPUT TYPE=”IMAGE” SRC=”epassporte.gif” NAME=”SUBMIT” ALT=”Pay By ePassporte”>
</FORM>
Sample code for link:
https://www.epassporte.com/secure/eppurchase.cgi?acct_num=[account number here]&pi_code=[product code here]&amount=[product amount here]&product_name=[product description here]&gohere=CART&dothis=ADD_ITEM
Money Booker Payment Integration With Api
April 10, 2009 at 2:19 am | In Payment Gateway | Leave a CommentTags: Moneybooker Api, Moneybooker Payment gateway Integration, Moneybooker Paymentgateway integration with api, Mpneybooker Payement Gateway, Paymentgateway
Money Booker Payment Basic Integration Api
|
Basic integration <form action=”https://www.moneybookers.com/app/payment.pl” method=”post” target=”_blank”> |
|
| N.B.:
With this basic integration you are required to manually check whether the payment was processed successfully by viewing your account history.Although you will receive email notification upon each payment to the email address which you have provided as “status_url”, you will HAVE TO check your history, as it is not secure to rely on emails. Money Booker Payment Gateway Advance Integration <form action=”https://www.moneybookers.com/app/payment.pl” target=”_blank”> |
UnMP3 – flash mp3 player
April 10, 2009 at 2:15 am | In Joomla Podcast | Leave a CommentTags: Flash Player, Joomal Mp3 Player, Joomla Component, Joomla Flash Player, Joomla Mp3 Component, UnMP3
Mp3 Player for Joomla 1.5. Upload your own mp3 files! Editable playlist. Create as many players as you want. Customise the mp3 player to your own colours. Simple design to fit any website. Share on other websites. Popup window option. Full vector, so you can resize gracefully. At the moment the popup has issues when Joomla SEO settings are on in global configuration. We are looking into this issue. Latest version released 28/02/09. Mp3 player resizing available in module.
Download :- http://www.unmp3.com/unmp3_download.html
Podcast Joomla Listem/Feed itunes…
April 4, 2009 at 12:59 am | In Joomla Podcast | Leave a CommentTags: Joomla, podcast
A podcast (not to be confused or equated with Apple Inc’s iPod)
usually consists of a combination of audio and/or video that is made
available for download via syndication. It is this syndication aspect
of the delivery that separates a podcast from a file available for
download. The files are usually retrieved with software applications
(generically known as podcatchers) such as Apple’s iTunes so
that subscribers can listen at their convenience on devices that have
intermittent, slow, or are otherwise lacking Internet access. The
podcatcher reads an RSS feed (whose entries point to specific podcasts, usually sorted by date) to identify and retrieve the podcast.
Like the term broadcast, podcast can refer either to the content itself or to the method by which the content is syndicated; the latter is also called podcasting. A podcaster is the person who creates the content.
A podcast is syndicated via an RSS feed. This feed enables distribution over the Internet by syndicated download. Though the same content may also be made available by direct download or streaming,
a podcast is distinguished from most other digital media formats by its
ability to be syndicated, subscribed to, and downloaded automatically when new content is added.
The term is a portmanteau of the words “iPod” and “broadcast”,[1] the Apple iPod being the brand of portable media player for which the first podcasting scripts were developed (see history of podcasting).
Such scripts allow podcasts to be automatically transferred from a
personal computer to a mobile device after they are downloaded.[2]
As more devices other than iPods became able to synchronize with podcast feeds, a backronym developed where podcast stood for “Personal On Demand broadCAST.”[3][4][5] though such a definition would create a misnomer,
because podcasts are not available “on demand”; they are subscribed to
and usually received at set intervals. Such a definition would more
accurately describe a direct download or streaming media.
For Joomla YOu can download component form
http://extensions.joomla.org/extensions/search/1/podcast/
Powered by ScribeFire.
Durpal Theme
April 4, 2009 at 12:57 am | In Uncategorized | Leave a CommentTags: ajax, Drupal
http://11heavens.com/using-ajax-in-Drupal-6
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.