PDA

View Full Version : cj country redirect?


jeroenp
07-21-2002, 06:21 AM
does this exist a cj script when someone clicks on your gallery links when the user is from us, germ, uk it opens a selected page for that country (like dialers, etc)

i have a lot of chinese, russian traffic

eldominik
07-21-2002, 06:33 AM
You can set redirects in .htaccess for every country, select any page where you have only dialers and redirect there your foreign country traffic. I don`t think so that trade script with these options exist.

TeenGodFather
07-21-2002, 06:42 AM
Is there a javascript that shows ads regarding to the place of origin, say german ads to germans etc?

eldominik
07-21-2002, 07:08 AM
I think that kinghost.com use that script, maybe you ask them support or search at some big script sites.
I let you know when I ask my friend what had advertisments at kinghost.com for some selected countries.

Binghiman
07-21-2002, 12:15 PM
Originally posted by TeenGodFather
Is there a javascript that shows ads regarding to the place of origin, say german ads to germans etc?


If you want to display German ads for Germans and Russian ads for Russians etc ... and do this on one and the same page without redirecting ... I can help you with that. This solution will also let you show random German ads for Germans and random Russian ads for Russians etc. Let's say you have two banner spots on your main page. Now: where you want the ads to go you put SSI tags:

<!--#include file="banner1.txt" -->
<!--#include file="banner2.txt" -->

Then you use Apache Content Negotiation, and you set Options Multiviews, AddLanguage and LanguagePriority. Read more at http://httpd.apache.org/docs/content-negotiation.html if you don't know how to do this already.

Them you create the actual .txt files, like:

banner1.txt.de
banner1.txt.ru
banner2.txt.de
banner2.txt.ru

An example .txt file can then look like:

<SCRIPT LANGUAGE="Javascript"><!--
function banner() {
};
banner = new banner();
number = 0;
// bannerArray
banner[number++] = "<a href='http://' target='_blank'><img src="germanbanner1.gif"></a>"
banner[number++] = "<a href='http://' target='_blank'><img src="germanbanner2.gif"></a>"
banner[number++] = "<a href='http://' target='_blank'><img src="germanbanner3.gif"></a>"
increment = Math.floor(Math.random() * number);
document.write(banner[increment]);
//--></SCRIPT>

It's as easy as that :-)

Binghiman
07-21-2002, 12:18 PM
Originally posted by jeroenp
does this exist a cj script when someone clicks on your gallery links when the user is from us, germ, uk it opens a selected page for that country (like dialers, etc)

i have a lot of chinese, russian traffic


Link to a file called sponsor.php and use the code below in that file:

<?
$user_lan = $HTTP_ACCEPT_LANGUAGE;

if($user_lan=='fr') {
## French
$redir_url = "http://www.frenchsponsor.com";

} elseif($user_lan=='es') {
## Spanish
$redir_url = "http://www.spanishsponsor.com";

} elseif($user_lan=='de') {
## German
$redir_url = "http://www.germansponsor.com";

} elseif($user_lan=='it') {
## Italian
$redir_url = "http://www.italiansponsor.com";

} elseif($user_lan=='ar') {
## Other Non-Us Languages
$redir_url = "http://www.othersponsor.com";

## US traffic or Rest of world not defined above
} else {
$redir_url = "http://www.yourmainurl.com";

}

header("Location: $redir_url");
exit;

?>