Do You AdBrite Your Self?

AdBrite is one of international online advertising services similar to Google AdSense. If you intended to work on it, both services can bring you additional reasonable revenue gained from internet. Well, this current article will share you a short review about my first experience on incoming cheque from my AdBrite account (which was registered since 2007 – the same year as my Google Adsense account was created).

After running this both online ads within the same year (2007) until now, at least I can say that my AdBrite revenue is 1/10 lower than my Google AdSense. Still, this comparison rate is relatively to others, but in fact, this is all I’ve got. I’m not telling more detailed about targeted ads on a page or other aspects involved to it but one thing for sure that I used this service only on this blog. Note that I just want to proof that this is payable to Indonesian publishers & will cause benefit like any else online advertising.



Regarding to the terms and conditions – unfortunately - AdBrite support cheque payment method only. For the first time – as usual – I need to make sure that my own cheque can be cleared to local bank. In order to do so, as possible as my balance reach the minimal limit, as soon as I have to make a withdrawal. Here’s below the chronologies:

May 1: AdBrite processing my balance automatically after it reaches minimal amount limit
May 6: Post stamp the mail goes from California
May, 13: The cheque delivered to my office
June, 2: Withdrawal transaction started made to BNI
July, 9: The money was collectable on my account on BNI

From occurrence above, I can conclude that AdBrite has sent the cheque faster than Google AdSense (read my first revenue from Google cheque article on this link). It only took 6 days for AdBrite mailed the cheque after the system detected the minimal amount limit. The mail also arrived after 7 days delivery from California to Jakarta, and this is what I called instant service! (a very fast service equal to Google AdSense delivered by mail, but not with Western Union)



Like to what I said before, this is only my first AdBrite payment test. So that I only need my first US$ 101 from AdBrite. Please consider that this amount was collected over 2 years right up on this single blog (since November 2007), and however, this is what I called a mess! (a very unsuitable environment appealed to Google AdSense, at least it happened to me).



So, what the heck is WELLS FARGO BANK? Just like something weird bank name. But, from the internet I found that this is a European Union bank headquartered in Ireland. At first, I so doubt that I can make withdrawal collection from local bank since I didn’t recognize this name ever! But then, thanks to International Collection Clearing staff at BNI which calmed me that this will withdraw able.



After waiting for 5 weeks - from June 2 to July 9 - finally the money was succeeded transferred to my account on BNI. I checked from BNI Internet Banking & there’s a record tracked to my AdBrite collection transaction. Look that I only receipt Rp 472.350 for US$ 101 withdrawal. By the rate of exchange Rp 10.080 per US$1 on July 9, it’s means that BNI charge for this took US$ 54 (similar to Rp 545.730)! I don’t know about bank correspondences charge rate but as I remember for previous transaction, this is a “special gift” for me. For god sake, but I enjoy it.

Labels: ,

  Post a Comment Bookmark and Share

Configuring Private Domain Email with Google Apps

Owning personal domain hosted on a hosting company is one of prestige for some persons. This could be a great benefit to whom aware with that, as they could share their profiles just like personal website or blog or e-commerce online application for examples. Along with existing social networks epoch, ease of communication is one of important thing that can never be separated from web 2.0 trend nowadays. Unfortunately, not all cheap hosting provided SMTP services to manage their outgoing email from client accounts. Especially to newbies programmer who wants to develop an automation email for such of auto email notification or auto responder, this will raise a problem.

But then, thanks to Google as they can provide another free service called with Google Apps, which helpful to solve things like this. Even though this is not a latest service, Google Apps can make possibility to create email based on personal domain. For example; if you have a domain named mydomain.com, Google Apps can enable GMail to provide webmaster@mydomain.com email address. The benefit is, the SMTP and POP3 are absolutely free, so that it is possible to make an automation email responder or something similar. For advanced programmers who wants to connect their script for this purposes, you can switch to this link. In this current article, I just want to share you about how to create personal domain based email using Google Apps.

For this necessity, let assume that you already have GMail account and had signed to http://www.google.com/a successfully. First, you have to verify domain ownership by the instruction given from Google Apps dashboard links.



After finished verifying domain ownership, switch to your domain control panel given from your hosting provider (for this test, I use spanel module. Anything could be different but it has the same points). Go to Domain and DNS Manager from Domain menu and open up Edit DNS link.



You will be prompted similar display showing you current MX configuration from hosting company. Give an attention on options #7, #8, #10 - #12 on below images.



Remove options #7, #8, #10 - #12 and change to the following configuration (options #8 - 15). This will override MX setting to GMail configuration.



After you updated above settings completely, tell Email MX reception type to accept Remote MX from Subdomain Manager on the same Domain menu. This means that the primary MX is switched to Google server and will not be received at all on your hosting server.



While it proceed & still on the same menu, add a subdomain which purposed redirect to Google Apps login page from a short URL of your domain name. For example, you can create subdomain named with webmail.mydomain.com and this is alias name to your Google Apps URL.



That’s it and you’re done. Your current Google email with your active domain will be activated couple days after you had confirmed domain ownership.



After it verified, you can start to access it from your short URL (above defined as webmail.domain.com) and gained all benefits by using GMail account. Just send an email to your other email address and see that sender address is come from webmaster@mydomain.com. Trust me, it’ll works!

Labels:

  Post a Comment Bookmark and Share

Bridging MySQL Server on Different Host with PHP

Accessing single core database records from several existing online systems is a top application development priority. There are no others choice to retrieve rows on-the-fly accurately without having a pure real live connection. In a corporation which implementing single sign-in on some separated (web based) applications, each login page modules must connected to single dedicated users table in data center in order to verify user’s right. This is a sample about the use of clustering application technique.

Integrating multiple online systems so that it have both data connection; one in local & one in other host can be made with 2 styles; simple & difficult. I said it simple if there’s less or no security policy restriction on both servers. For example, let assume that it’s possible for server B granted request query only from server A. On this condition, it’s easy as provide two common connections in a configuration laid in server A without paying attention on security issues in server B.

<?php
$linkA = mysql_connect("hostA", "mysql_userA", "mysql_passwordA");
mysql_select_db("databaseA", $linkA);
$resultA = mysql_query("SELECT * FROM tableA", $linkA);
$num_rowsA = mysql_num_rows($resultA);

$linkB = mysql_connect("hostB", "mysql_userB", "mysql_passwordB");
mysql_select_db("databaseB", $linkB);
$resultB = mysql_query("SELECT * FROM tableB", $linkB);
$num_rowsB = mysql_num_rows($resultB);

echo "Host A: $num_rowsA Rows\nHost B: $num_rows Rows";
?>


This also can be done if you have designed the network and servers infrastructure by your own self as secure as it should be, by using VPN line or granted all privileges in server B only from server A. But, be sure that you must have root privileges on both servers to configure this out. All of above is a simple one.



But, what if you have no root privileges at all, or there’s a bit complicated situation which server A currently reside on an external web hosting company and server B is behind a firewall on local network (no port allowed except HTTP)? Well … well, this is not a simple way. Although that it’s not a simple, but it has another solutions. Solve the problem - I called it – with bridging method.

Bridging method basically based on SOAP technique. You can clearly read my previous article on this blog about what is SOAP actually including my extra specimen code. This method is simply as using XML to transferring the data. It’s a RMI like on Java (Remote Method Invocation) or known as application server. From picture above, a request query sent to Server B from Server A. Server B recognizing accepted command & continuing to process the query. Then result query will be returned back to Server A. Anyway, it might have a bit degraded performance, but believes me; I don’t want to talk about it right now.

Back to topic, at least, result query retrieval mode on web based application divide into 2 conditions which is single & multiple results. A single result can directly passing to a variable or text box. A more complex is multiple results such as menu/list box. Watch picture below.



Picture above explains a page from server A displaying result query obtained from data bridging from other host (server B). First object (the text box) hold only one row result returned, while combo box can hold many records. Here, I’ll explain what you have done to solve this. To get started, first off all, you need the same PHP SOAP library taken from my previous article. I renamed this library as “bridge.soap.php” & let it stored on both servers. On script in Server A, you must define the initialization:

require_once('bridge.soap.php');
$serverpath ='http://serverB/bridge.php';
$namespace="urn:xmethods-SOAPWebService";


$serverpath is variable hold a target application server on server B. okay, let’s straight more deep, if you need to request a single row result query then this below is the template:

$perintah="SELECT * FROM tableB WHERE fieldB='" . $varB ."'";
$field='fieldB';
$param= array('perintah'=>$perintah,'field'=>$field);
$client=new soapclient($serverpath);
list($field) = $client->call('get_row',$param,$namespace);
unset($client);


$field variable explain what field on database Server B that will be retrieved. And so on, the result query will also be stored on this same variable name (just to make easier). Anyway, it’s quite different if you need to retrieve multiple fields record by bridging & store it to combo box. Check below template:

$perintah="SELECT * FROM tableB order by fieldB1";
$field='fieldB1# fieldB2';
$param= array('perintah'=>$perintah,'field'=>$field);
$client = new soapclient($serverpath);
$record = $client->call('get_loop',$param,$namespace);
$row=explode("#",$record);
for ($x = 0; $x < count($row); $x++) {
$value='';
$col=explode("|",$row[$x]);
for ($y = 0; $y <= count($col); $y++) $value=$value . $col[$y] . '|';
$value=substr($value, 0, -2);
$value_kode=explode("|",$value);
echo("<option value='$value_kode'>$value</option>");
}
unset($client);


Same as first template, $field also hold what field that will be retrieved but it can contains more than single field. For example above, it declared to retrieve fieldB1 and fieldB2 (with # as delimiter). This is similar to query statement:

SELECT fieldB1,fieldB2 FROM tableB order by fieldB1


2nd template actually based on 1st skeleton template. I modified 1st template into 2nd so that it now possible to gain multiple fields. Even both templates look similar, but it’s different; while the 1st calling get_row function, the 2nd calling get_loop function. These both functions are exists on server B. It’s a kind a RPC (Remote Procedure Call) function as a part of application server. For instances, below script are template of SOAP server (I named as bridge.php) only reside on server B (the function definition called from Server A):

<?php
function get_row($perintah,$field)
{
$param = array();
$fieldno=explode("#",$field);

$hasil=mysql_query($perintah) or die($perintah);
while ($row=mysql_fetch_array($hasil))
{
for ($x = 0; $x <= count($fieldno); $x++) array_push($param,$row[$fieldno[$x]]);
}
return $param;
}

function get_loop($perintah,$field)
{
$param = array();
$param_row='';
$fieldno=explode("#",$field);

$hasil=mysql_query($perintah) or die($perintah);
while ($row=mysql_fetch_array($hasil))
{
$param_col='';
for ($x = 0; $x < count($fieldno); $x++) $param_col=$param_col . $row[$fieldno[$x]] . '|';
$param_col=substr($param_col, 0, -1) . '#';
$param_row=$param_row . $param_col;
}
$param_row=substr($param_row, 0, -1);
return $param_row;
}

require_once('bridge.soap.php');
$linkB = mysql_connect("hostB", "mysql_userB", "mysql_passwordB");
mysql_select_db("databaseB", $linkB);

// create the server object
$server = new soap_server;

// register the lookup service
$server->register('get_row');
$server->register('get_loop');

// send the result as a SOAP response over HTTP
$server->service($HTTP_RAW_POST_DATA);
?>


So, now it looks quite clear, huh? The application on server A is connecting to server B through bridge.php. The bridge.php become as database gateway, receive request, querying & send the result back. This is quite stupid, but also more reliable than a technique which I describe earlier (synchronization method) on this blog. Both of techniques were currently used on some of my projects showed on my homepage. You can simulate all appropriate to your existing situation. If you have other ideas or techniques, please let us know. See you on my next experiences…

Labels: , , ,

  Post a Comment Bookmark and Share