Archive for October, 2008|Monthly archive page

Conditional paypal Recurring!

Membership will be recurring. Payment will be deducted every month on admin defined date.
For example, admin selected 1st of every month as the payment day, payment will be deducted automatically on this date.
If a member registers on 20th of any month, he will be initially charged for 10 days and then for every month.

The easiest way to make this work is to create a trial period for the days remaining in the month and have an initial payment for this prorated period.

<form action=”https://www.sandbox.paypal.com/cgi-bin/webscr&#8221; method=”post”>

<input type=”submit” border=”0″ name=”submit” value=”PayPal” />
<input type=”hidden” name=”cmd” value=”_xclick-subscriptions” />
<input type=”hidden” name=”business” value=”<? echo $business_email; ?>” />
<input type=”hidden” name=”item_name” value=”recurring test account” />
<input type=”hidden” name=”no_shipping” value=”1″>
<input type=”hidden” name=”no_note” value=”1″ />

<!– Mandatory for Recurring –>
<input type=”hidden” name=”notify_url” value=”<? echo $notify_url; ?>” />

<input type=”hidden” name=”return” value=”<? echo $return; ?>” />
<input type=”hidden” name=”currency_code” value=”USD” />

<!– Trial $10.00 for 10 Days –>
<input type=”hidden” name=”a1″ value=”10.00″ />
<input type=”hidden” name=”p1″ value=”10″ />
<input type=”hidden” name=”t1″ value=”D” />

<!– Recurring $5.00 for every 3 months –>
<input type=”hidden” name=”a3″ value=”5.00″ />
<input type=”hidden” name=”p3″ value=”3″ />
<input type=”hidden” name=”t3″ value=”M” />

<!– Mandatory for Recurring –>
<input type=”hidden” name=”sra” value=”1″ />

</form>

By Lalit Kumar Jain

Print2Flash Software Development Kit

Print2Flash Software Development Kit

http://www.print2flash.com/

Print2Flash lets you easily convert any printable document (e.g. Microsoft Word, or Excel, or PowerPoint document) to an Adobe ® Flash ® file (file with SWF extension). This file can be shared with users who don’t have the software that created the original document (for example, Microsoft Word). You can view such files with Adobe ® Flash ® Player that is available across a number of operating systems. And these files can be easily published on the Web as well for fast and easy access to them from anywhere across the globe.

wget for DOS (File Downloader)

How to download zipped file in DOS like in wget linux………

Easy try to file wget for windows….

http://pages.interlog.com/~tcharron/wgetwin-1_5_3_1-binary.zip

file:///C:/wget/wget.exe

Supported Video Formats

Supported Video Formats | Stories for Change

ffmpeg

As stated above, the Stories for Change site uses an application called ffmpeg (http://ffmpeg.mplayerhq.hu) to convert uploaded videos to Flash. This application supports most video file formats and codecs.

A video file format is a standard for encoding digital video, audio and some auxiliary information (metadata) into a file. In contrast to audio and image formats, most video file formats are containers, allowing for a variety of audio and video codecs to be used. See http://en.wikipedia.org/wiki/Video_file_format for more information.

A video codec is a software module that enables the use of compression for digital video, and an audio codec is used to convert audio to a particular file format. See http://en.wikipedia.org/wiki/Video_codec and http://en.wikipedia.org/wiki/Audio_codec for more information. A video file is created using specific video and audio codecs. What codecs are used depends on the tools that are used to create the video.

PuTTY User Manual

PuTTY User Manual

PuTTY User Manual

PuTTY is a free (MIT-licensed) Win32 Telnet and SSH client. This manual documents PuTTY, and its companion utilities PSCP, PSFTP, Plink, Pageant and PuTTYgen.

Note to Unix users: this manual currently primarily documents the Windows versions of the PuTTY utilities. Some options are therefore mentioned that are absent from the Unix version; the Unix version has features not described here; and the pterm and command-line puttygen utilities are not described at all. The only Unix-specific documentation that currently exists is the man pages.

This manual is copyright 2001-2007 Simon Tatham. All rights reserved. You may distribute this documentation under the MIT licence. See appendix C for the licence text in full.

Pear Exapmles

http://www.laurent-laville.org/index.php/pear/qfams/download

Send email with PHP and GMail hosted for your domain

UPDATE: Send email with PHP and GMail hosted for your domain at VulgarisOverIP

UPDATE: Send email with PHP and GMail hosted for your domain
Published at October 13, 2006 in GMail, PHP and phpgmailer.

Due to the amount of requests emailed to me for working source code I have now posted the modified PHPMailer I use in my own projects. Click here to download the library. Here’s an example of how to use the code:

require_once(‘/phpgmailer/class.phpgmailer.php’);
$mail = new PHPGMailer();
$mail->Username = ‘user@domain.com’;
$mail->Password = ‘password’;
$mail->From = ‘user@domain.com’;
$mail->FromName = ‘User Name’;
$mail->Subject = ‘Subject’;
$mail->AddAddress(‘myfriend@domain.com’);
$mail->Body = ‘Hey buddy, here’s an email!’;
$mail->Send();

This will work for any GMail or Google Hosted email account. Just make sure to include the @domain.com part for the username, even if it’s for standard GMail. Hope this saves people some hastle.

[tags]gmail, php, google, phpmailer[/tags]

How to Send Email from a PHP Script Using SMTP Authentication

PHP mail() and SMTP Authentication

We are getting problem in sending email from our server and then we find this amazing resource, we are very thankful to this blog and content..

PHP mail() function is so simple is its lack of flexibility. Most importantly mail() does not usually allow you to use the SMTP server of your choice, and it does not support SMTP authentication, required by many a mail server today, at all.

Fortunately, overcoming PHP’s built-in shortcomings need not be difficult, complicated or painful either. For most email uses, the free PEAR Mail package offers all the power and flexibility needed, and it authenticates with your desired outgoing mail server, too. For enhanced security, secure SSL connections are supported.

To connect to an outgoing SMTP server from a PHP script using SMTP authentication and send an email:

Sending Mail from PHP Using SMTP Authentication – Example

require_once “Mails.php”;

$from = “Sandeep Verma “;
$to = “Sandeep Nayak “;
$subject = “Hi!”;
$body = “Hi,\n\nHow are you?”;

$host = “mail.sandeep.com”;
$username = “smtp_username”;
$password = “smtp_password”;

$headers = array (‘From’ => $from,
‘To’ => $to,
‘Subject’ => $subject);
$smtp = Mail::factory(‘smtp’,
array (‘host’ => $host,
‘auth’ => true,
‘username’ => $username,
‘password’ => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
echo(”

” . $mail->getMessage() . ”

“);
} else {
echo(”

Message successfully sent!

“);
}
?>

Sending Mail from PHP Using SMTP Authentication and SSL Encryption – Example

require_once “Mails.php”;

$from = “SandeepVerma “;
$to = “My Recipient “;
$subject = “Hi!”;
$body = “Hi,\n\nHow are you?”;

$host = “ssl://mail.example.com”;
$port = “465”;
$username = “smtp_username”;
$password = “smtp_password”;

$headers = array (‘From’ => $from,
‘To’ => $to,
‘Subject’ => $subject);
$smtp = Mail::factory(‘smtp’,
array (‘host’ => $host,
‘port’ => $port,
‘auth’ => true,
‘username’ => $username,
‘password’ => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
echo(”

” . $mail->getMessage() . ”

“);
} else {
echo(”

Message successfully sent!

“);
}
?>

$wgSMTP = array(
‘host’ => “ssl://smtp.gmail.com”,
‘IDHost’ => “gmail.com”,
‘port’ => 465,
‘auth’ => true,
‘username’ => “youremail@gmail.com”,
‘password’ => “yourpassword”
);

Reference: How to Send Email from a PHP Script Using SMTP Authentication – About Email

JavaScript: reading a file

JavaScript: reading a file

The JavaScript code that starts the reading process looks as follows:

var fileContent=”;
var theLocation=”;

function readFileViaApplet(n) {
document.f1.t1.value=’Reading in progress…’;
document.ReadURL.readFile(theLocation);
setTimeout(“showFileContent()”,100);
}

function showFileContent() {
if (document.ReadURL.finished==0) {
setTimeout(“showFileContent()”,100);
return;
}
fileContent=document.ReadURL.fileContent;
document.form1.textarea1.value=fileContent;
}

How Reverse DNS Works

How Reverse DNS Works (RDNS)

How Reverse DNS Works (RDNS)

or, “Almost a Reverse DNS FAQ”
Reverse DNS turns an IP address into a hostname — for example, it might turn 192.0.2.25 into host.example.com.

For your domains, standard DNS (turning a hostname into an IP address, such turning host.example.com into 192.0.2.25) starts with the company (registrar) that you registered your domains with. You let them know what DNS servers are responsible for your domain names, and the registrar sends this information to the root servers (technically, the parent servers for your TLD). Then, anyone in the world can access your domains, and you can send them to any IP addresses you want. You have full control over your domains, and can send people to any IPs (whether or not you have control over those IPs, although you should have permission to send them to IPs that are not yours).

Reverse DNS works in a similar method. For your IPs, reverse DNS (turning 192.0.2.25 back into host.example.com) starts with your ISP (or whoever told you what your IP addresses are). You let them know what DNS servers are responsible for the reverse DNS entries for your IPs (or, they can enter the reverse DNS entries on their DNS servers), and your ISP gives this information out when their DNS servers get queried for your reverse DNS entries. Then, anyone in the world can look up the reverse DNS entries for your IPs, and you can return any hostnames you want (whether or not you have control over those domains, although you should have permission to point them to hostnames that are not on your domains).

So for both standard DNS and reverse DNS, there are two steps: [1] You need DNS servers, and [2] You need to tell the right company (your registrar for standard DNS lookups, or your ISP for reverse DNS lookups) where your DNS servers are located. Without Step 2, nobody will be able to reach your DNS servers.

If you can comprehend the above paragraphs (which takes some time), you’ll understand the biggest problem that people have with reverse DNS entries. The biggest problem people have is that they have DNS servers that work fine with their domains (standard DNS), they add reverse DNS entries to those servers, and it doesn’t work. If you understand the above paragraphs, you’ll see the problem: If your ISP doesn’t know that you have DNS servers to handle the reverse DNS for your IPs, they won’t send that information to the root servers, and nobody will even get to your DNS servers for reverse DNS looksups.

Basic Concepts:
Reverse DNS turns 192.0.2.25 into host.example.com (an IP address into a host name).
Typical reverse DNS lookup path: DNS resolver => root servers => ARIN (North American IP registry) => Local ISP => Acme Inc. DNS servers.
Whoever supplies your IP addresses (usually your ISP) MUST either [1] set up your reverse DNS entries on their DNS servers, or [2] “delegate authority” for your reverse DNS entries to your DNS servers.
Reverse DNS entries use a host name with a reversed IP address with “.in-addr.arpa” added to it — for example, “25.2.0.192.in-addr.arpa”.
Reverse DNS entries are set up with PTR records (whereas standard DNS uses A records), which look like “25.2.0.192.in-addr.arpa. PTR host.example.com” (whereas standard DNS would look like “host.example.com. A 192.0.2.25”).
All Internet hosts should have a reverse DNS entry (see RFC1912 section 2.1).
Mail servers with no reverse DNS will have a hard time getting mail to certain large ISPs.
Very Common Myth:
Myth: If you have a reverse DNS entry listed in your DNS server, you have reverse DNS properly set up.
Fact: This is often not the case. You need TWO things in order to have your DNS set up properly:
1. Your DNS servers (or your ISP’s) MUST have the reverse DNS entries set up (“25.2.0.192.in-addr.arpa. PTR host.example.com”).
2. AND your ISP or bandwidth provider MUST set up the reverse DNS on their end, so that DNS resolvers around the world will know that your DNS servers are the ones to go to when looking up the reverse DNS for your IP addresses.
How a reverse DNS lookup is accomplished:
The DNS resolver reverses the IP, and adds it to “.in-addr.arpa”, turning 192.0.2.25 into 25.2.0.192.in-addr.arpa.
The DNS resolver then looks up the PTR record for 25.2.0.192.in-addr.arpa.
The DNS resolver checks asks the root servers for the PTR record for 25.2.0.192.in-addr.arpa.
The root servers refer the DNS resolver to the DNS servers in charge of the Class A range (192.in-addr.arpa, which covers all IPs that begin with 192).
In almost all cases, the root servers will refer the DNS resolver to a “RIR” (“Regional Internet Registry”). These are the organizations that allocate IPs. In general, ARIN handles North American IPs, APNIC handles Asian-Pacific IPs, and RIPE handles European IPs.

The DNS resolver will ask the ARIN DNS servers for the PTR record for 25.2.0.192.in-addr.arpa.
The ARIN DNS servers will refer the DNS resolver to the DNS servers of the organization that was originally given the IP range. These are usually the DNS servers of your ISP, or their bandwidth provider.

The DNS resolver will ask the ISP’s DNS servers for the PTR record for 25.0.2.192.in-addr.arpa.
The ISP’s DNS servers will refer the DNS resolver to the organization’s DNS servers.

The DNS resolver will ask the organization’s DNS servers for the PTR record for 25.0.2.192.in-addr.arpa.
The organization’s DNS servers will respond with “host.example.com”.
(C) Copyright 2000-2004 R. Scott Perry (from dnsstuff.com)