Category Archives for General

How to change FeedBurner Reader Statistic Using PHP cURL


If you want to change the traditional feedburner  reader statistic image use the below program in your widgets which will fetch the readers feedburner .Everyone has one: Digg, Feedburner, Pownce, Flickr, Google Maps, etc. FeedBurner provides a sweet “Awareness API” that allows you to pull statistics from your FeedBurner account. Here’s how you do it using PHP cURL.

//open connection  

$ch = curl_init();  

//set the url, number of POST vars, POST data  

curl_setopt($ch,CURLOPT_URL,‘http://api.feedburner.com/awareness/1.0/GetFeedData?id=#######’);  

curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);    

curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);  

     //execute post  

     $content = curl_exec($ch);  

     $subscribers = get_match(‘/circulation=”(.*)”/isU’,$content);  

echo ‘Subscribers:  ’.$subscribers;  

      //close connection  

curl_close($ch);  

/* helper: does the regex */  

function get_match($regex,$content)  

{  

          preg_match($regex,$content,$matches);  

    return $matches[1];  

}  

 

It’s that easy. What makes this even better is that I hate FeedBurner’s “badge” and I can manipulate the result of the above code any way I want.  To learn more about FeedBurner’s Awareness API and the information you can pull about your feed view the below url http://code.google.com/apis/feedburner/awareness_api.html

Export data from MYSQL to EXCEL

Php script to export data from MYSQL to EXCEL. export data from mysql to excelYou can just upload this application and use. It no needs any database or any other external plugin. To get this web application just pay $6  (Click here to Pay) and just send your payment detail and mail id through the contact form.

Regular Expressions in php

Master in Regular Expressions.

Regular expression can be explained as a pattern that can match various text strings. Using regular expressions you can find (and replace) certain text patterns, for example “all the words that begin with the letter A” or “find only telephone numbers”. Regular expressions are often used in validation classes, because they are a really powerful tool to verify e-mail addresses, telephone numbers, street addresses, zip codes, and more.

In this tutorial I will show you how regular expressions work in PHP, and give you a short introduction on writing your own regular expressions. I will also give you several example regular expressions that are often used.Regular Expressions in PHP
Using regex (regular expressions) is really easy in PHP, and there are several functions that exist to do regex finding and replacing. Let’s start with a simple regex find.

<?php

// Example string

$str = "Let's find the stuff <here>in between</here> these two previous brackets";

// Let's perform the regex

$do = preg_match("/<here>(.*)</here>/", $str, $matches);

// Check if regex was successful

if ($do = true) {

// Matched something, show the matched string

echo htmlentities($matches['0']);

// Also how the text in between the tags

echo '<br />' . $matches['1'];

} else {

// No Match

echo "Couldn't find a match";

}

?>

More expressions

//Credit card: All major cards
'^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6011[0-9]{12}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})$'

//Credit card: American Express
'^3[47][0-9]{13}$'

//Credit card: Diners Club
'^3(?:0[0-5]|[68][0-9])[0-9]{11}$'

//Credit card: Discover
'^6011[0-9]{12}$'

//Credit card: MasterCard
'^5[1-5][0-9]{14}$'

//Credit card: Visa
'^4[0-9]{12}(?:[0-9]{3})?$'

//Credit card: remove non-digits
'/[^0-9]+/'
//Email address
//Use this version to seek out email addresses in random documents and texts.
//Does not match email addresses using an IP address instead of a domain name.
//Does not match email addresses on new-fangled top-level domains with more than 4 letters such as .museum.
//Including these increases the risk of false positives when applying the regex to random documents.
'\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b'

//Email address (anchored)
//Use this anchored version to check if a valid email address was entered.
//Does not match email addresses using an IP address instead of a domain name.
//Does not match email addresses on new-fangled top-level domains with more than 4 letters such as .museum.
//Requires the "case insensitive" option to be ON.
'^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$'

//Email address (anchored; no consecutive dots)
//Use this anchored version to check if a valid email address was entered.
//Improves on the original email address regex by excluding addresses with consecutive dots such as john@aol...com
//Does not match email addresses using an IP address instead of a domain name.
//Does not match email addresses on new-fangled top-level domains with more than 4 letters such as .museum.
//Including these increases the risk of false positives when applying the regex to random documents.
'^[A-Z0-9._%-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}$'

//Email address (no consecutive dots)
//Use this version to seek out email addresses in random documents and texts.
//Improves on the original email address regex by excluding addresses with consecutive dots such as john@aol...com
//Does not match email addresses using an IP address instead of a domain name.
//Does not match email addresses on new-fangled top-level domains with more than 4 letters such as .museum.
//Including these increases the risk of false positives when applying the regex to random documents.
'\b[A-Z0-9._%-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}\b'

//Email address (specific TLDs)
//Does not match email addresses using an IP address instead of a domain name.
//Matches all country code top level domains, and specific common top level domains.
'^[A-Z0-9._%-]+@[A-Z0-9.-]+\.(?:[A-Z]{2}|com|org|net|biz|info|name|aero|biz|info|jobs|museum|name)$'

//Email address: Replace with HTML link
'\b(?:mailto:)?([A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4})\b'

Earn From Home - Online

Affiliate programs is the best way to make money online.Affiliate marketing using one site to drive traffic to another website is a form of online marketing.

Affiliate programs and affiliate marketing is nothing but, buy-sell others products and specified tasks through your website.Now a days the affiliate programs is creating revolution in the Internet market and generates huge income for buyer-sellers.Many webmasters are earning huge income through their website using affiliate programs.

Join as affiliate member is absolutely free of cost.When you sign up with an affiliate marketing company they offers you a simple form to fill the personal details about you and your website address.Once you offer the details to them,then they will verify your details and your website, weather the website is qualified for to promote their products or not.Once they approve your website and account they will mail you in couple of days.After receiving confirmation mail from them,Sign in with your affiliate account using your user id and password which offered by them or enter your own unique id and password as you offered in the form earlier while you apply for affiliate program.

CJ,eBay and amazon are the genuine affiliate program marketing network companies available in online.To join as affiliate and starting to make money online is very quick and easy.All you have to do is creating a website then sign up as affiliate member with affiliate network companies.Every affiliate network companies is promoting lot of products under their belt.

Choose your product from their list and,copy and paste the HTML code in your website in appropriate place and start promoting through your website.For example you have a website related to music,pick music related affiliate products to promote through your website.The desired product seller had already defined the task of the product how they will pay for affiliates.Most of the affiliates will offer the payments against sale only.Some times its against pay per lead or pay per click (Mostly its against pay per sale only) too.All the affiliate program companies will offer you the tools and assistance to promote your desired product online.

In this website we offer you great techniques about how to be a successful affiliate marketer and how to earn more money through affiliate programs even working from home.

 

Antivirus Test File.

Using real viruses for testing in the real world is rather like setting fire to the dustbin in your office to see whether the smoke detector is working. Such a test will give meaningful results, but with unappealing, unacceptable risks. Since it is unacceptable for you to send out real viruses for test or demonstration purposes, you need a file that can safely be passed around and which is obviously non-viral, but which your anti-virus software will react to as if it were a virus.

This test file has been provided to EICAR for distribution as the “EICAR Standard Anti-Virus Test File”, and it satisfies all the criteria listed above. It is safe to pass around, because it is not a virus, and does not include any fragments of viral code. Most products react to it as if it were a virus (though they typically report it with an obvious name, such as “EICAR-AV-Test”).

The file is a legitimate DOS program, and produces sensible results when run (it prints the message “EICAR-STANDARD-ANTIVIRUS-TEST-FILE!”).

It is also short and simple - in fact, it consists entirely of printable ASCII characters, so that it can easily be created with a regular text editor. Any anti-virus product that supports the EICAR test file should detect it in any file providing that the file starts with the following 68 characters, and is exactly 68 bytes long:

X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

The first 68 characters is the known string. It may be optionally appended by any combination of whitespace characters with the total file length not exceeding 128 characters. The only whitespace characters allowed are the space character, tab, LF, CR, CTRL-Z. To keep things simple the file uses only upper case letters, digits and punctuation marks, and does not include spaces. The only thing to watch out for when typing in the test file is that the third character is the capital letter “O”, not the digit zero.

For more information : Antivirus test