Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
got it working
used a rather crude method
$refers = $_SERVER['HTTP_REFERER'];
$refer = substr($refers, 0, 12);
if ($refer == "http://www.v")
{
$server_name = "www.vagweb.co.uk/forums/";
}
if ($refer == "http://www.e")
{
$server_name = "www.edition30.co.uk/forums/";
}
|
Cybermonkey
Member
Registered: 22nd Sep 02
Location: Sydney, Australia
User status: Offline
|
Steve, i guarantee that will fuck up some way or another
|
topshot_2k
Banned
Registered: 1st Dec 03
Location: Northampton Drives: Pug GTi-6
User status: Offline
|
crude.
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
no it will not
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
the only time it wont work is if you use http://vagweb.co.uk or http://edition30.co.uk
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
however i cant think of a way round that
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
all works now
$refers = $_SERVER['HTTP_REFERER'];
$refer = substr($refers, 0, 12);
$refer2 = substr($refers, 0, 8);
if ($refer == "http://www.v")
{
$server_name = "www.vagweb.co.uk/forums";
}
if ($refer == "http://www.e")
{
$server_name = "www.edition30.co.uk/forums";
}
if ($refer2 == "http://v")
{
$server_name = "vagweb.co.uk/forums";
}
if ($refer2 == "http://e")
{
$server_name = "edition30.co.uk/forums";
}
PMSL i should write a book, steves bodging code.
although that now works better than it did without as before it wouldnt store cookies properly when using http://vagweb.co.uk
it does now
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
noone impressed with my bodges
|
Brett
Premium Member
Registered: 16th Dec 02
Location: Manchester
User status: Offline
|
Read the thread title and thought it was gonna be a problem with your penis for some reason
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
You can manually program in a strpbrk function. A lot less crude and will work if you don't use the www prefix.
|
Cybermonkey
Member
Registered: 22nd Sep 02
Location: Sydney, Australia
User status: Offline
|
quote: Originally posted by Steve
all works now
$refers = $_SERVER['HTTP_REFERER'];
$refer = substr($refers, 0, 12);
$refer2 = substr($refers, 0, 8);
if ($refer == "http://www.v")
{
$server_name = "www.vagweb.co.uk/forums";
}
if ($refer == "http://www.e")
{
$server_name = "www.edition30.co.uk/forums";
}
if ($refer2 == "http://v")
{
$server_name = "vagweb.co.uk/forums";
}
if ($refer2 == "http://e")
{
$server_name = "edition30.co.uk/forums";
}
PMSL i should write a book, steves bodging code.
although that now works better than it did without as before it wouldnt store cookies properly when using http://vagweb.co.uk
it does now
steve WTF
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Yes, considering as the whole PHP manual is online
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
im a lovely lad, im all for something working, dont care if its done properly or not
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
ok bodging over i found a proper way of doing it,
i added to common.php the line
code: $board_config['server_name'] = $_SERVER['HTTP_HOST'] . "/forums";
which works for everything
|