Converting from ?id=blah to ?blah [56k warning]
Moderator: General Moderators
Converting from ?id=blah to ?blah [56k warning]
1. Source code
--http://dumbass.ionichost.com/img/source_main.php
--http://dumbass.ionichost.com/img/source_index.php
2. The parts to be aware of:
--Anything that has ?id= or $id sitting in it. (Mostly on main source page)
--Anything that says "URL, PAGE, LOAD IDENTITY" (Mostly on index source page)
--http://www.invano.com/'s "Invano Navigation PHP Tutorial"
3. Questions
--How would I integrate Invano's url explode script so that it reduces ?id=blah to ?blah, while still integrating my current news/content include page (That also has a "if file exists, load the content, if not, auto load the news page")
--How do I keep my "Page Last Modified" snippet working, as it requires the definition of "$id" to be present, which if the Invano snippet is substituted, then $id wouldn't be defined, leaving errors like "Cannot find .php page on main.php line XX"
4. Notes
--I have no access to the core PHP files, only my scripts (aka, I can't access the php installation_
--I cannot edit .htaccess on my server
Mod rewrite isn't PHP either. Multiviews is.theda wrote:I can only use PHP for this... if you havent guessed already.
You'll have to add this to a .htaccess file;
Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4tthis... if you havent guessed already.[/quote]
Mod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;
Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVERї'PATH_INFO']))
{
$vardata = explode('/', $_SERVERї'PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardataї] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$getї $vardataї$i] ] = $vardataї$i+1];
}
return $get;
}
?> quote]
Mod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVERї'PATH_INFO']))
{
$vardata = explode('/', $_SERVERї'PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardataї] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
ltiviews is.
You'll have to add this to a .htaccess file;Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVERї'PATH_INFO']))
{
$vardata = explode('/', $_SERVERї'PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardataї] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$getї $vardataї$i] ] = $vardataisn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
"theda"]I can only use PHP for this... if you havent guessed already.[/quote]
Mod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call parseMultiviews()[/b:20427d4c"theda"]I can only use PHP for this... if you havent guessed already.[/quote]
Mod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;
Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4t= 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>
(very fast typed and not the best example though)
If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4tet;
}
?>
(very fast typed and not the best example though)
If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4t/quote]
Mod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;
Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardatod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVERї'PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
if you havent guessed already.[/quote]
Mod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4t]
RewriteEngine On
Options MultiViews
(sometimes +Multiviews)
Than you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call parseMultmp;lt;?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>
(very fast typed and not the best ex only use PHP for this... if you havent guessed already.[/quote]
Mod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;
Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4t20427d4cb8]
(sometimes +Multiviews)
Than you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call parseMultiviews(), the script will parse al argumenseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>
(very fast typed and not the best example though)
If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4t11; $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>
(very fast typed and not the best example though)
If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4t
RewriteEngine On
Options MultiViews
(sometimes +Multiviews)
Than you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVERї'PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardataї] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$getї $vardataї$i] ] = $vardataї$i+1];
}
return $get;
}
?>
ultiviews)
Than you'll have to use a code likeCode: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>
(very fast typed and not the best example though)
If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4t"theda"]I can only use PHP for this... if you havent guessed already.[/quote]
Mod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;
Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4tr this... if you havent guessed already.[/quote]
Mod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;
Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call parseMultiviews()[/b:20427d4cess file;
Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4tfor this... if you havent guessed already.[/quote]
Mod rewrite isn't PHP either. Multiviews is.
You'll have to add this to a .htaccess file;
Code: Select all
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVERї'PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardataї] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$getї $vardataї$i] ] = $vardataїions MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardataї] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[4cb8]
RewriteEngine On
Options MultiViewsThan you'll have to use a code like
Code: Select all
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>If you then call VER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardataї] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
ret
<?php
function parseMultiviews()
{
$get = array();
if(!empty($_SERVER['PATH_INFO']))
{
$vardata = explode('/', $_SERVER['PATH_INFO']);
$num_param = count($vardata);
if($num_param % 2 == 0)
{
$vardata[] = '';
$num_param++;
}
for($i = 1; $i < $num_param; $i += 2)
$get[ $vardata[$i] ] = $vardata[$i+1];
}
return $get;
}
?>
(very fast typed and not the best example though)
If you then call parseMultiviews(), the script will parse al arguments behind the =.
x4t
As a general statement, I'd say if you are already using the $id variable in one script, and the new script conflicts, do a search replace of that variable.
However, with no information beyond that, like being able to see the code, I can't give an accurate answer.
I sincerely encourage you to adjust your attitude. People are trying to help you, and you are not only insulting them, you are also being rude in exchange. This is a learning forum - many of the members (yourself included, since you have questions to ask) still are not perfect.theda wrote:So please, quit giving me the same WRONG answer.
The fact that they are attempting to help you is why you are here. Continued rude responses to attempts at helping you can ensure that you will get few or no responses from the people that visit often.
Which script on invano are you trying to integrate that causes a conflict?theda wrote:LMAO! Oopsies, sorry about that... I used the wrong url
I'd guess it's somewhere close to you continuing to be rude (to the people you are asking for help!) when I've asked you to try to be a little appreciative that ANYONE is willing to help you.theda wrote:You don't know how annoying it is asking a specific answer, having people answer the wrong question, tell them something even more specific and get the same exact answers even after the fact...
You aren't perfect, and neither is anyone on these forums. If you want perfect answers, go pay google answers. These forums are for learning - learning often means you will get wrong answers to get to the right answer.