Redirection to NYT?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
LiveFree
Forum Contributor
Posts: 258
Joined: Tue Dec 06, 2005 5:34 pm
Location: W-Town

Redirection to NYT?

Post by LiveFree »

Hello All,

With this code:

Code: Select all

if (!defined('IN_TW')) die ('You Cannot Access this File Directly!');
	$name = stripslashes($_GET['name']);
	
		if (isset($name)){
	if ($config['lock_modules']){
		if ($name != TW_MODULE_DIR."Profile" && !$userdata['session_logged']) redirect(TW_TOP_DIR.'/index.php', $config['server_protocall'], 0);   
	}
	
	if (!is_dir($name)) redirect(TW_TOP_DIR.'/index.php', $config['server_protocall'], 0);
	
	if (file_exists($name . 'case.php')) require(TW_MODULE_DIR.$name.'/case.php');
	   else
	die('Case File does not Exist');

		}else{
		require(TW_MODULE_DIR.'News/case.php') OR DIE('Could Not Include News Case File!');
}
When I go to my site, I get redirected to the NEW YORK TIMES website.

Has my computer been infected with a virus already? Is there a Linux equiv. of a hosts file?
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

This is obviously not the entire piece of code, although it probably is a file. Are you accessing the file or the index of the actual website? What software are you using?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Is this the part...

Code: Select all

redirect(TW_TOP_DIR.'/index.php', $config['server_protocall'], 0);
That is redirecting you?
Post Reply