Tuesday, October 9, 2007

phpBB anti-spam code

This is an extra anti-spam code to keep protecting your forum from bots that learned the user_name feature as detailed on the previous phpBB anti-spam post:


Open
/includes/usercp_register.php

search for this code:
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";


and after that line create a new line and paste this code:
if($HTTP_POST_VARS['user_aim'] == $HTTP_POST_VARS['user_yim']){ if($HTTP_POST_VARS['user_aim'] != ""){$sql = "";}}
if($HTTP_POST_VARS['user_aim'] == $HTTP_POST_VARS['user_msnm']){if($HTTP_POST_VARS['user_msnm'] != ""){$sql = "";}}
if($HTTP_POST_VARS['user_msnm'] == $HTTP_POST_VARS['user_yim']){if($HTTP_POST_VARS['user_yim'] != ""){$sql = "";}}
if(substr($HTTP_POST_VARS['user_email'],-2) == "ru"){ $sql = "";}



And that's it, you are done. Your forum now is a little more secure.

Ricardo Guimaraes
Avatar Interactive
http://www.avatarinteractive.com

Wednesday, June 20, 2007

Web 2.0, Facebook and Social Media sharing

This is a great article about Facebook and how to use the Social Media:

http://www.clickz.com/showPage.html?page=3626204

Extract from the article:

"For a vendor to just throw their brand into an application isn't going to succeed. They need to create more utility for our users… and if the brand is part of that, great"

"For marketers at this point, it's [not about] developing an application just to develop an application. It's about working very hard and studying the marketplace and developing an application the users will see utility in."

"You want to make sure that you're getting that social network advantage, which is sharing the application"

"...we wanted to have an experience that you'll push to other friends in your network."



Ricardo Guimaraes

Tuesday, June 19, 2007

Myspace Clone - Ning

Looks like that the Web 2.0 Myspace revolution is only beginning - we have now thousands of new social network websites coming up every day.

Of those that I tested, the one that looks not so bad is the Ning. This is a complete platform, and they offer you also the hosting, where users will upload pictures and videos.

But they are taking the profit for the Adsense. So if you are looking for a open source clone of Myspace, you will likely to have to pay for it.

Or you can start using Ning, create your social network, and do not pay to purchase code, do not pay to host, do not pay bandwidth to store photos and videos - but also do not generate money.

It is a choice, you can have a look at one example at http://mabrumiami.ning.com


Ricardo Guimaraes
Avatar Interactive

Digg clone - Pligg

There is a lot of fuzz around Digg.com, a News website. Registered users can post news, and they are allowed to vote - the most voted ones makes the first page.

This is Web 2.0, collaborative, the Internet community choses what is relevant, placing the news they want on the first page.

You can create your own Digg clone for your market - using open source Pligg.

Just go to http://www.pligg.com, download it and install, it uses PHP and MySQL, and installation is not difficult.

If you would like to see an example, http://www.marineair.info/pligg/

You can also show a picture with the news description on the first page, this will make your pligg more appealing.


Ricardo Guimaraes
Avatar Interactive

Tuesday, May 1, 2007

Second Life: do not wait to get in on the front end of this new workforce that will be coming.

"Second Life is not a video game. Its a virtual world. People use it for either a work place or to buy items. You can buy real items, instead of a website or the local mall, you can go into a virtual world. Others, use it for bisniuess, they can have online meetings. Instead of owning a wensite, you can own a virtual world to show off what your bisinuess has to offer. It is not a video game." Source: some youtube video.

http://www.secondlife.com/whatis/economy-graphs.php
http://www.youtube.com/watch?v=ovL4pZod_gw
http://www.youtube.com/watch?v=synxFmQJ_0A&mode=related&search=
http://www.businessweek.com/magazine/content/06_18/b3982001.htm


Meet me at the game: Ricardoavatar Kohime


Ricardo Guimaraes

Thursday, April 12, 2007

Video: The Web 2.0 Revolution Started, and Video is # 1.

Here are the top video sites on the Web:


Web Property Visitors, July 2006 (in millions)

1. Yahoo Video 21.1
2. MySpace Videos 20.1
3. YouTube 16.1
4. MSN Video 14.6
5. AOL Video 10.5
6. Heavy 8.3
7. Google Video 6.8
8. Ebaum's World 5.4
9. iFilm 3.3
10. Break 2.6
11. Metacafe 2.0
12. Atom Films 1.3
13. Veoh 0.7
14. Grouper 0.5
15. Revver 0.2

Source: ComScore Media Metrix

Monday, April 9, 2007

Traffic Stats for Web 2.0's 25 Sexiest Sites March 2007

Web 2.0 - this is a good article posted on ebizmba:

"Traffic Stats for Web 2.0's 25 Sexiest Sites March 2007"

http://www.ebizmba.com/articles/top10_largest_social_bookmarking_sites.html



Ricardo Guimaraes
http://www.avatarinteractive.com

Monday, March 26, 2007

Website Optimization

When you are optimizing your website, you should have at least:

* Keyword included in title
* Keyword in meta keywords líst
* No stop words in your title tag
* Website name not included in title
* Keyword placed as close to the beginning of the meta keywords líst as possible
* Keyword is in the first 50 words and last 50 words of the page
* Page content is between 100 and 1400 words
* Keyword appears in bold at least once in the content
* Keyword has a 2% weíght
* Keyword is in the first heading tag and is at the top of the page content
* Keyword is in one of the first three alt image attributes and is in three of them in total


Ricardo Guimaraes
http://www.avatarinteractive.com

Wednesday, March 21, 2007

Web 2.0 - How to optimize your website for the New Internet





If you would like to have a competitive business in the near future, you need to get it onto the Web 2.0 right now:


- Optimize your website (page titles, content with keywords, page names, pictures names);

- Display Add to bookmarks buttons on all pages;

- Provide a send to friend feature for all products and services you offer;

- Create how-to videos and post them on YouTube and video.google;

- Allow users to review and rate your products;

- Provide a forum at your site;

- Register your forum at BoardTracker;

- Setup an del.icio.us account, and place a button in your website;

- Create a MySpace page, and develop your online social network in MySpace, and link your website;

- Create a Blog, post articles and link them to your website;

- Provide an button for direct posting of blog articles to Digg;

- Register and write content at Wikipedia, with links to your website;

- Provide RSS feeds for your new products, blogs, forum postings, etc;

- Register you feesd at Feedburner;

- Use social photo sharing sites like Flickr;

- Learn and use AJAX;


Do not wait to get started!!!


Ricardo Guimaraes
http://www.avatarinteractive.com


Monday, March 19, 2007

Live Help in PHP with MySQL database - great code

I wanted to install on one of my customers website a Live Help, where customers would be able to contact an operator and chat online.

I knew about LivePerson and other payed solutions, but I was looking for something for free, with no obligations, no contract, and that would run on php and MySQL.




I found out then about the Crafty Syntax Live Help http://www.craftysyntax.com/ - this aplication runs on GNU/GPL License, is completely free to use, and runs great.

And the best, it took me only one minute to install, all you have to do is to upload the files on your server, and setup the login and password for the database, generate the HTML code to put on your website, and it is done.

If you would like to see the application running, go to http://www.mabru.com, or to http://www.naturaloption.us.

Recommended.

Ricardo Guimaraes
http://www.avatarinteractive.com

Thursday, March 1, 2007

I was trying to find a way to block phpBB forum spam bots / spammers, and it took me a while to find out a way that would work with phpBB forum.

After some days and many tries, I found this code on the Internet, and this is working great me, now no more robots, spam, spammers, and all crap from my forum.


Open
/includes/usercp_register.php
and search:
Code:
$username = ( !empty($HTTP_POST_VARS['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';

replace with
Code:
$username = ( !empty($HTTP_POST_VARS['SOMETHING']) ) ? phpbb_clean_username($HTTP_POST_VARS['SOMETHING']) : '';

open
/templates/.../profile_add_body.tpl
search:
Code:
name="username"

replace with
Code:
name="SOMETHING"


Open
/includes/usercp_register.php
search:
Code:
$trim_var_list = array('cur_password' => 'cur_password', 'new_password' => 'new_password', 'password_confirm' =>

add before
Code:
if ($HTTP_POST_VARS['username']) { sleep (20); }



Ricardo Guimaraes
http://www.avatarinteractive.com

Monday, February 5, 2007

How to create your own Search Engine - using PHP and mySQL

Create your own Search Engine

I decided: why not create a own search engine crawler, and crawl my own website? And crawl all my competitors websites? And check what I am missing on Google Page Rank? And have my own Search Engine?

This is what I did, I installed the http://astellar.com/opensource/php-crawler/.

This is really easy to install, just download it and upload to your server, you have to create only one database table, and set up the config file, and that is all. Up and running.

I found out that this php-crawler had one problem when finding an JPG image or a PDF, then what you should do is to insert one code on the file crawler/crawler.php between

print "Crawling: [" . $URL_info["depth"] . "] {$URL}";

### this is the new code you should insert ###

$url22 = substr($URL,-3);
if($url22 == "pdf" | $url22 == "Pdf" | $url22 == "PDF" | $url22 == "jpg" | $url22 == "Jpg" | $url22 == "JPG" | $url22 == "gif" | $url22 == "Gif" | $url22 == "GIF")
{
drop_url_from_db($URL_info["id"]);
print " - FAILED/REMOVED.
\n";
continue;
}

### here ends the new code you should insert ###

$page = fetch_URL($URL);
if ($page === false)
{
drop_url_from_db($URL_info["id"]);
print " - FAILED/REMOVED.
\n";
continue;
}


And that is all, your crawler will be up and running with your new search engine. You can check the one I made up at http://www.marineparts.ws/.


How to populate your Search Engine with a lot of websites?

One strategy you could use to populate your search engine is what I am doing: I have one major website that I receive a lot of traffic. I did create one script in php where I read the referer - where my visitors are coming from.

Then, I do not consider my own domain name, and also I do not consider google, yahoo, msn, and major search engines domain names.

If the user is coming from a new website, then I just will go and crawl it. This way, the more traffic I receive, the more websites I will be able to crawl.


Ricardo Guimaraes
http://www.avatarinteractive.com


I want to receive your feedbacks about this post, thanks.

Wednesday, January 31, 2007

I just read one article from SiteProNews (http://www.sitepronews.com/).

They write great articles, and I would like to comment on this one about Click Fraud.

I recently had one campaign running and I noticed a enormous click fraud on my stats. I made up a system that would track every single click. So I will try to answer some questions on the article:

* How do you define an invalid (i.e., non-billable) clíck?

I did made up a PHP landing page that gets the referer, the user_agent, from (with PPC), and saves this on a database and also create a cookie on the visitor computer. Then, the system redirects this user to a second page, that is the page that has the content, and this second page checks if user were able to store cookie.

My code, you may need to do some adjustments if you plan to use it, I am creating a cookie with an unique ID number so I will be able to see the total "real" visitors from my campaign, and I create the cookie2, that store a unique ID from an specific search engine PPC where I am running the campaign.

" . erro("Erro no SQL", "$sql_str", "email") ."

");

$sql_str2 = "select max(cookie_enable) as maxcookie from nat_stat";
$sql2 = mysql_query($sql_str2) or die ("erro");
$array2 = mysql_fetch_array($sql2);
$maxcookie = $array2[maxcookie] + 1;

$sql_str3 = "select max(cookie_enable2) as maxcookie2 from nat_stat where from_ = '$from'";
$sql3 = mysql_query($sql_str3) or die ("erro");
$array3 = mysql_fetch_array($sql3);
$maxcookie2 = $array3[maxcookie2] + 1;

setcookie("cookie_enable", "$maxcookie",time()+60*60*24*30*356*10);
setcookie("cookie_enable2", "$maxcookie2",time()+60*60*24*30*356*10);

$loc= "Location: http://www.my_real_landing_page.com/_.php?from=" . $from . "&k=" . $k . "&referer=" . $referer . "&ip=" . $ip . "&user_agent=" . $user_agent;
header($loc);
?>


* What is the true size of the clíck fraud problem?

I found out that is big, only one example, from Miva I received one day 550 users, and only 53 had user agent information. On Miva system were showing that I received 450 clicks, and they charged me.

* With all the publishers you have purportedly kicked-out of your publisher networks–and the clíck bots that you claim to stop at your gate–why hasn't there been ANY criminal prosecution of someone for activities related to clíck fraud?

The big three (Google, Yahoo, MSN) do not send you all that fraud, they block it. The small ones, I had good experience with Goclick, all the others, the fraud was enormous.


* When you cut off a distribution partner for fraudulent activity, do you retroactively refund questionable ad revenue to all effected advertisers—not just the ones whose complaints generated the inquiry?

I am complaining and I did only receive about 10% of the refund that I should be receiving. I can imagine that who do not complain....



Ricardo Guimaraes
Avatar Interactive

Internet

I spent part of my life (more than 12 years) working exclusively on Internet projects.

I would like to share here some of what I have learned, and I want to keep learning with your posts.

Ricardo