Bing Translator – PHP Usage
I’d like to share a php code that you can use for bing translator api. Just add your bing api id into “AppID= ” part.
<?php
echo translate(’Hello World’, ‘en’, ‘fr’);
function translate($text, $from, $to) {
$data = file_get_contents(’http://api.bing.net/json.aspx?AppId=YoutApiIDHere&Sources=Translation&Version=2.2&Translation.SourceLanguage=’ . $from . ‘&Translation.TargetLanguage=’ . $to . ‘&Query=’ . urlencode($text));
$translated = json_decode($data);
if (sizeof($translated) > 0) {
if (isset($translated->SearchResponse->Translation->Results[0]->TranslatedTerm)) {
return $translated->SearchResponse->Translation->Results[0]->TranslatedTerm;
} else {
return false;
}
} else {
return false;
}
}
?>
AS2 Domain Lock – Protecting SWF Files
Domain Locking is the simple way to protect your swf files at least from newbies. Here’s what i’ve found for domain locking. Just copy and paste this code into first frame;
urls_allowed = ["www.guidefordesign.com"];
sitelock(urls_allowed);
function sitelock(urls_allowed) {
lock = true;
domain_parts = _url.split(”://”);
real_domain = domain_parts[1].split(”/”);
domain.text = real_domain[0];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
lock = false;
}
}
if (lock) {
_root._alpha = 0;
}
}
for multiple domain lock just change the line above;
urls_allowed = ["www.guidefordesign.com","www.anotherdomain.com"];
source: emanueleferonato.com
90 Cool Seo Tools

You should check searchenginegenie.com . There are too many usefull seo and webmaster tools in this site.
Best Ways to Earn Money From Your Flash Game
Here’s the best ways to earn money from your flash game;
1. Finding sponsors.
You may sell your game to a sponsor. Some of the sponsors that buy flash games; ArmorGames, CrazyMonkeyGames, Flashrange.com, www.zbeng.ro
2. Markets to sell games or your flash applications;
. Buy Stock Flash
. Flash Juggler
. Flash Marketplace
. Flash Do
. Flash Scope
. Stock Fuel
. Flash Components
. Active Den
. Flash Game License (games only, auction + shop)
. Flashgamelicence.com
3 Game Networks
a) I offer you mochimedia.com. They have free tools and services for monetizing, distributing and tracking your games. You earn money when someone play your game somewhere around the world, sounds great.
b) Gamegum which offers %50 commision revenue sharing. Just upload your game.
Removing folder with the files inside with php
Another usefull php function. It removes a folder with the content inside.
//function
function delTree($dir) {
$files = glob( $dir . ‘*’, GLOB_MARK );
foreach( $files as $file ){
if( substr( $file, -1 ) == ‘/’ )
delTree( $file );
else
unlink( $file );
}
rmdir( $dir );
}
//usage
delTree(’FolrderName’);
php function against sql injection
I’ve began to use this usefull function against sql injection and cleaning other bad characters before inserting data into database.
//function
function clean($str) {
$str = @trim($str);
if(get_magic_quotes_gpc()) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
}
// usage:
clean($_POST["data"]);
hope it helps.
Free Online Web Site Submission Services
Free online web site submission services that i use regularly. Hope it helps
3. Add me
Also a helpfull link;
Search Engine List For DoFollow Links
How can we find dofollow links for link building? Here’s the list of search engines for finding dofollow links:
http://www.backlinkmagic.com/
http://w3ec.com/dofollow
http://techmm.com/dofollow
http://www.followtopia.com
http://www.commenthunt.com
http://www.commentlinkbuilding.info
http://bloggtag.com/en/dofollow-search
http://www.inlineseo.com/dofollowdiver
http://www.bestrealincome.com/dofollowsearch.htm
http://www.wmtips.com/tools/dofollow-search-engine
http://www.hippowebsolutions.com/dofollow-search-tool
http://www.ezbusinessneeds.com/dofollow.php
Top 70 ajax demos and code examples
For more attractive web sites;
- Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell
- AJAX – microlink pattern tutorial : A microlink is a link that opens up content below it.
- Ajax BBC News RSS Reader : demo by Nigel Crawley
- AJAX Chat in Python with Dojo : at AquaAjax
- Ajax Chess : multiplayer chess
Read the rest of this entry »
