1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need advice about this project

Discussion in 'Business & Tax Advice' started by masterfl, May 7, 2010.

  1. masterfl

    masterfl Junior Member

    Joined:
    Apr 28, 2010
    Messages:
    160
    Likes Received:
    29
    Occupation:
    Fulltime Web Developer, Newbie IM
    Location:
    Philippines
    Home Page:
    Hi All,

    I am a newbie in the IM business but I am a fulltime web developer so I am trying to use my programming skills to create a program to improve my earning from ads on my website (1 wordpress blog, 5 autoblog, 1 minisite). I do not plan on selling this script but the thought crossed my mind.

    I got the idea from the site peerfly because I was approved there but they only offer ads mostly for US/Canada visitors so I never used their ads because I don't want to replace my adsense ads ( yes, I am really a newbie with IM :) ) yet with those kind of ads

    So what I plan to do is to use geolite from maxmind to create a script to show different ads depending on where the user came from

    for example:

    if the user came from US, ad A is displayed (or ad A or C or D, if you set 3 ads to be randomly shown for US visitors)
    if the user came from UK, ad B is displayed
    else adsense is displayed

    What I am asking is if there is no existing script like this, what feature do you want to see in this kind of script or what feature do you think should I add?

    I did my research but I didn't find this script on the net so I thought I might ask the people here for advice

    ---

    One possible script too is to redirect users to different sales page or affiliate page depending on their country but again, I am new to IM so I am not sure how to utilize this kind of script as I am only using adsense and CJ ads on my sites.

    I already did something like this before for a client where he asked me to create a script where the user on the landing page will be redirected to different page (that is set on the admin module) depending on their country with the option to hide the referrer of the visitor or not

    ---

    I am still busy reading A LOT of the free ebooks that is shared here (thanks peter) but this simple project is one of my top priority whenever I got some free time (after I redid my autoblog by following shez's guide which I still need to finish)

    Thanks in advance to those who will share their thoughts
     
  2. homenet

    homenet Power Member

    Joined:
    Jan 5, 2009
    Messages:
    790
    Likes Received:
    338
    Location:
    Dimension X
    Don't want to hijack your thread but there is already a script that does this that I use:

    Code:
    <?php
    include("geoip.inc");
    include("geoipcity.inc");
    include("geoipregionvars.php");
    	 
    $gi = geoip_open("./GeoLiteCity.dat", GEOIP_STANDARD);
    	 
    $rsGeoData = geoip_record_by_addr($gi, $_SERVER['REMOTE_ADDR']);
    	 
    $country = ($rsGeoData->country_name);
    
    if ($country == 'United States'){
    header( 'Location: http://www.test1.com' ) ;
    die();
    }
    else
    {
    header( 'Location: http://www.test2.com' ) ;
    die();
    }
    	 
    geoip_close($gi);
    
    ?>
    Currently if the users are from the US then it directs them to test1.com (i've changed my url's obviously) all other visitors get directed to test2.com, of course you can specify if statements for as many countries as you want and then send the rest elsewhere after. If you or anyone else wants the 3 include files that make this script work then let me know and i'll upload them.

    EDIT: Also, why is this thread in the business and tax advice section? :p
     
  3. masterfl

    masterfl Junior Member

    Joined:
    Apr 28, 2010
    Messages:
    160
    Likes Received:
    29
    Occupation:
    Fulltime Web Developer, Newbie IM
    Location:
    Philippines
    Home Page:
    Thanks for the reply Homenet

    Yes, that is the basic code for redirecting a URL using geoip but my main plan is to show ads depending on the location. I meam the image ads that are displayed on the page will be customized depending on the visitor's country

    Example use on the website:
    PHP:
    <? php include 'admanager.php'//initialize the use of the script ?>
    PHP:
    <div>
    <?php showAd('ID'); ?>
    </div>
    I posted this on the business advice as I am also trying to see if it is profitable to sell this kind of script so I am trying to get some advice on what feature should I add if I ever decided to push through with this business idea

    One thing I need to consider is if this will be a personal project then I don't need to be consider making the functions user friendly, etc but if I plan to sell the script in the future then I need to add it as a major factor that this should be very user friendly and casual users should be able to add this to their page without needing to know any programming at all.

    Thanks again for your reply
     
  4. homenet

    homenet Power Member

    Joined:
    Jan 5, 2009
    Messages:
    790
    Likes Received:
    338
    Location:
    Dimension X
    Majin, apologies, I see what your saying now. Yes indeed this would require a small bit of modification something like:

    Code:
    <?php if ($country == 'United States'){
    ?>
    HTML CODE GOES HERE TO DISPLAY US AD
    <?php
    }
    else
    {?>
    HTML GOES HERE TO DISPLAY OTHER AD
    <?php
    }
    ?>
    I think this would be a nice little script to make and sell and I definetly think people would pay money for this it it was nice and user friendly, if you created a control panel to manage everything then im sure you could make some $$$ selling this a script.
     
  5. masterfl

    masterfl Junior Member

    Joined:
    Apr 28, 2010
    Messages:
    160
    Likes Received:
    29
    Occupation:
    Fulltime Web Developer, Newbie IM
    Location:
    Philippines
    Home Page:
    @homenet: yes, I plan to add a user friendly control panel (when I decide to sell this publicly) what I need to know are the features that web owner like yourself need in a script like this

    As for me, I only need the very basic feature to show different ads depending on the visitors' IP and maybe a report on how many times an ad is shown

    thanks again
     
  6. homenet

    homenet Power Member

    Joined:
    Jan 5, 2009
    Messages:
    790
    Likes Received:
    338
    Location:
    Dimension X
    Ok cool, I guess another good feature to include would be - Multiple ad rotations - Allow the user to input multiple ads per country and then cycle them either randomly or on a timed basis.

    Good luck with your venture!
     
  7. masterfl

    masterfl Junior Member

    Joined:
    Apr 28, 2010
    Messages:
    160
    Likes Received:
    29
    Occupation:
    Fulltime Web Developer, Newbie IM
    Location:
    Philippines
    Home Page:
    that is already a feature, the flow is:

    1. get the user's country
    2. get the ads for the country
    3. if there is more than one, select one randomly

    thanks again for the input