Jump to content

URL conversion


vigneshn

Recommended Posts

i need to convert [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--][a href=\"http://www.centraldirectory.net/showcats.php?sbcat_id=49\" target=\"_blank\"]http://www.centraldirectory.net/showcats.php?sbcat_id=49[/a][/quote]
to [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--][a href=\"http://www.centraldirectory.net/showcats.php?cat=directories\" target=\"_blank\"]http://www.centraldirectory.net/showcats.php?cat=directories[/a][/quote]
i can make use of preg replace functions to remove spaces so no need to worry about that just please do the above modification
ie
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--][a href=\"http://www.centraldirectory.net/\" target=\"_blank\"]http://www.centraldirectory.net/showcats.php?sbcat_id=[/a][!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]"a cat number"[!--colorc--][/span][!--/colorc--][/quote]
to
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--][a href=\"http://www.centraldirectory.net/\" target=\"_blank\"]http://www.centraldirectory.net/showcats.php?cat=[/a][!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]"name"[!--colorc--][/span][!--/colorc--][/quote]
please i will give you the necessay files please post if you are interested
i did some editing but i got 404 not found pages so the link should work please thank you
Link to comment
https://forums.phpfreaks.com/topic/10136-url-conversion/
Share on other sites

I am not so sure what you exactly mean, but I [i]think[/i] thats what you need:
[code]$var=$_GET['sbcat_id'];
switch($var){
case 1:
header("Location: http://www.centraldirectory.net/showcats.php?cat=X");
exit;
break;
case 2:
header("Location: http://www.centraldirectory.net/showcats.php?cat=Y");
exit;
break;

//... And so on[/code]

You just need to write it...
Link to comment
https://forums.phpfreaks.com/topic/10136-url-conversion/#findComment-37769
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.