WickedFire - Affiliate Marketing Forum - Internet Marketing Webmaster SEO Forum

Go Back   WickedFire - Affiliate Marketing Forum - Internet Marketing Webmaster SEO Forum > >

Sell, Buy & Trade Think of this place as the stock market. Loud, bustling, and tons of angry people demanding all sorts of things, using words your mother would kill you for saying. Keep it legal and realistic, because you'll be banned if we catch you scamming or cheating.


Welcome to the WickedFire - Affiliate Marketing Forum - Internet Marketing Webmaster SEO Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Closed Thread
 
Thread Tools Display Modes
Old 01-19-2010, 04:37 PM   #1
erifdekciw
Senior Member
 
erifdekciw's Avatar
 
Join Date: May 2008
Posts: 2,125
iTrader: 5 / 100%
erifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond repute
Help Need a cloaking script or help from a coder

I need someone who knows what there doing with php who can explain to me how to use this code and implement it to my specifications or either help me build one from scratch if this code i got doesn't do what i want it to do.

PM me for more info.
erifdekciw is offline  
Sponsored Links
Old 01-21-2010, 08:22 PM   #2
erifdekciw
Senior Member
 
erifdekciw's Avatar
 
Join Date: May 2008
Posts: 2,125
iTrader: 5 / 100%
erifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond reputeerifdekciw has a reputation beyond repute
ok i got this code off bhw and now i need to know how to use it.

Quote:
<?php
if ($_SERVER["HTTP_X_FORWARDED"])
{
$ip = $_SERVER["HTTP_X_FORWARDED"];
}
elseif ($_SERVER["HTTP_FORWARDED_FOR"])
{
$ip = $_SERVER["HTTP_FORWARDED_FOR"];
}
elseif ($_SERVER["HTTP_FORWARDED"])
{
$ip = $_SERVER["HTTP_FORWARDED"];
}
elseif ($_SERVER["HTTP_X_FORWARDED"])
{
$ip = $_SERVER["HTTP_X_FORWARDED"];
}
else
{
$ip = $_SERVER["REMOTE_ADDR"];
}

$geo = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$ip));
$city = $geo['geoplugin_city'];

switch($city)
{
case "Dallas": <redirect to your targetted city page>;
break;

default: <redirect everyone else to this page>;
break;
}
?>
ive created a php page with this code in it and nothing else. how do i use it properly?

i've tried changing the city and puttin a url in the redirect to your targetted page line but when i upload it and go to the site the page lists a parse error on line 28 which is the case "Dallas": line.

how do i fix this and am i doing this correctly? do i need to have anything else on my page? 25$ for someone can help me figure this out.
erifdekciw is offline  
Old 01-22-2010, 05:51 PM   #3
kevin.hemminger
Junior Member
 
Join Date: Jan 2010
Posts: 11
iTrader: 0 / 0%
kevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond repute
Hey here, hope his helps you out ...

PHP Code:

// this records your visiting surfer's IP address ...
$checkip $_SERVER['REMOTE_ADDR'];

// or you could debug by using ... $checkip = "72.167.115.223"; ... which is my IP address that returned the sample data below


// for debugging purposes, this grabs the data but not in the form of an array, we will echo this to see all the variables available we can use
$geoData file_get_contents('http://www.geoplugin.net/php.gp?ip='.$checkip);

// output the data to debug
echo $geoData."<br /><br />";

// for me the data below was output ...
/*
a:14:{s:14:"geoplugin_city";s:10:"Scottsdale";s:16:"geoplugin_region";s:2:"AZ";s:18:"geoplugin_areaCode";s:3:"480";s:17:"geoplugin_dmaCode";s:3:"753";s:21:"geoplugin_countryCode";s:2:"US";s:21:"geoplugin_countryName";s:13:"United States";s:23:"geoplugin_continentCode";s:2:"NA";s:18:"geoplugin_latitude";s:13:"33.6119003296";s:19:"geoplugin_longitude";s:14:"-111.890701294";s:20:"geoplugin_regionCode";s:2:"AZ";s:20:"geoplugin_regionName";s:7:"Arizona";s:22:"geoplugin_currencyCode";s:3:"USD";s:24:"geoplugin_currencySymbol";s:5:"$";s:27:"geoplugin_currencyConverter";d:1;}
*/

// lets grab the data a second time, but this time combine it into an array 
$geo unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$checkip));

// out of all the data returned, this isolates the city
$city $geo['geoplugin_city'];

// lets go one step further and also grab the country which is found in the debugging code returned above
$country $geo['geoplugin_countryCode'];

// spitting it all out ...
echo "I am a visitor from $country country, from the city of $city"
Paste the above into a blank page and hopefully you can reason out how to use the data. Cheers.

Last edited by kevin.hemminger; 01-22-2010 at 05:55 PM.. Reason: comment out IP was used for debugging
kevin.hemminger is offline  
Old 01-22-2010, 06:13 PM   #4
kevin.hemminger
Junior Member
 
Join Date: Jan 2010
Posts: 11
iTrader: 0 / 0%
kevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond reputekevin.hemminger has a reputation beyond repute
Next you want to do something with the data ... the former script used a switch which is kind of crazy, what they expect you to do insert a list of every city in the world for the switch? What I would do is something a little more like this ...
PHP Code:

$dashCity 
str_replace(" ","-",$city);
Header"Location: http://".$_SERVER["HTTP_HOST"]."/$dashCity/" ); 
The above code would redirect your visitors to your page for that city. Assuming that was a Dallas page it would look like www.example.com/Dallas/ ... the str_replace puts dashes in there for cities with two words. Or you could have done it Header( "Location: http://".$_SERVER["HTTP_HOST"]."/?city=$dashCity/" ); many options

Hope this helps, cheers.
kevin.hemminger is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WTB cloaking script. erifdekciw Sell, Buy & Trade 4 11-17-2009 11:24 AM
Established Script selling website, making $700+ per month webbom Sell, Buy & Trade 3 03-31-2009 05:06 PM
Powerful VIRAL Traffic Generation Script - TheViralScript.com jclem Sell, Buy & Trade 33 01-18-2009 12:01 PM
My script for cloaking and geotargetting CygnusX Affiliate Marketing 6 06-16-2008 02:49 AM
Own your own script! - Social network Comment Script - Great income - Quality script SteveAR Sell, Buy & Trade 1 04-08-2008 04:36 PM


All times are GMT -4. The time now is 08:05 AM.


Search Engine Optimisation provided by DragonByte SEO v1.1.8 (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
WickedFire.com Copyright 2014 - WickedFire is an international registered Trademark of Coastal Synergy LLC. You may not use any of our trademarks, copyrights, content, or images without a written approval by members of Coastal Synergy LLC.