corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » I have a small problem


New Topic

New Poll
  <<  1    2  >> Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author I have a small problem
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 11:40   View Garage View User's Profile U2U Member Reply With Quote

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
20th Feb 07 at 11:43   View User's Profile U2U Member Reply With Quote

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
20th Feb 07 at 11:43   View User's Profile U2U Member Reply With Quote

crude.
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 11:43   View Garage View User's Profile U2U Member Reply With Quote

no it will not
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 11:45   View Garage View User's Profile U2U Member Reply With Quote

the only time it wont work is if you use http://vagweb.co.uk or http://edition30.co.uk
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 11:46   View Garage View User's Profile U2U Member Reply With Quote

however i cant think of a way round that
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 11:54   View Garage View User's Profile U2U Member Reply With Quote

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

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 12:14   View Garage View User's Profile U2U Member Reply With Quote

noone impressed with my bodges
Brett
Premium Member

Avatar

Registered: 16th Dec 02
Location: Manchester
User status: Offline
20th Feb 07 at 12:16   View Garage View User's Profile U2U Member Reply With Quote

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
20th Feb 07 at 12:16   View User's Profile U2U Member Reply With Quote

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
20th Feb 07 at 12:18   View User's Profile U2U Member Reply With Quote

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
20th Feb 07 at 12:21   View User's Profile U2U Member Reply With Quote

Yes, considering as the whole PHP manual is online
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 12:22   View Garage View User's Profile U2U Member Reply With Quote

im a lovely lad, im all for something working, dont care if its done properly or not
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 13:24   View Garage View User's Profile U2U Member Reply With Quote

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

  <<  1    2  >>
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
What's the loudest backbox ? Ajones_17 Help Zone, Modification and ICE Advice 8 800
5th Oct 04 at 09:12
by Ajones_17
 
power caps chris_clare Help Zone, Modification and ICE Advice 13 765
10th Mar 05 at 10:54
by AdiSRI
 
exhaust question (powerflow) Dan General Chat 23 827
11th May 05 at 23:43
by Stoneyginger
 
supercharging? Basscrazy Help Zone, Modification and ICE Advice 12 711
18th Dec 05 at 20:17
by combatvauxhall
 
LMF Vauxhall deception- shoot aftersales service abdus General Chat 87 4701
29th Jun 06 at 18:12
by abdus
 

Corsa Sport » Message Board » Off Day » Geek Day » I have a small problem 28 database queries in 0.0134761 seconds