lostnucleus Posted January 18, 2008 Share Posted January 18, 2008 Can anyon1 telll me please wat's the code of redirect.php used in below expample. http://www.dadesiforum.com/redirect.php?url=http://google.com thanks in advacne. Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/ Share on other sites More sharing options...
trq Posted January 18, 2008 Share Posted January 18, 2008 <?php if (isset($_GET['url'])) { header("Location : " $_GET['url']; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-442507 Share on other sites More sharing options...
lostnucleus Posted January 18, 2008 Author Share Posted January 18, 2008 superfast reply thanks a million mahn.......let me try it will post an feedback soon.... Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-442509 Share on other sites More sharing options...
lostnucleus Posted January 18, 2008 Author Share Posted January 18, 2008 got this following error boss. Parse error: syntax error, unexpected T_VARIABLE in /public_html/forums/redirect.php on line 4 also where i wd place my ads (as in the abv case) ,,,,looks stupid but i am an complete noob .. thanks Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-442518 Share on other sites More sharing options...
roshanbh Posted January 18, 2008 Share Posted January 18, 2008 In the code above, string concatenation is missing in the header() function try this code <?php if (isset($_GET['url'])) { header("Location : ".$_GET['url']; } ?> http://roshanbh.com.np Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-442538 Share on other sites More sharing options...
lostnucleus Posted January 18, 2008 Author Share Posted January 18, 2008 sorry to inform but that didnt worked as well..... Parse error: syntax error, unexpected ';' in /home/site/public_html/forums/redirect.php on line 4 thanks lookin 4rwd 4 an another solutinon Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-442558 Share on other sites More sharing options...
lostnucleus Posted January 18, 2008 Author Share Posted January 18, 2008 <HTML> <head> <TITLE>DaDesiForum</TITLE> </head> <frameset rows="150,1*" border="0" frameborder="0" framespacing="0"> <frame align="center" src="redirect-ads.php" scrollbar="no"> <frame src="http://google.com"> </frameset> </HTML> Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-442560 Share on other sites More sharing options...
lostnucleus Posted January 18, 2008 Author Share Posted January 18, 2008 is there any tab for topic unsolved.....?? Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-442897 Share on other sites More sharing options...
tsilenzio Posted January 18, 2008 Share Posted January 18, 2008 heres what u want: <HTML> <head> <TITLE>DaDesiForum</TITLE> </head> <frameset rows="150,1*" border="0" frameborder="0" framespacing="0"> <frame align="center" src="redirect-ads.php" scrollbar="no"> <frame src="echo $_GET['url']"> </frameset> </HTML> and on the line: <frame align="center" src="redirect-ads.php" scrollbar="no"> Replace redirect-ads.php with the location of the page you want there =] Note: Some browsers dont support frames, but all the newer ones do =] Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-442922 Share on other sites More sharing options...
lostnucleus Posted January 19, 2008 Author Share Posted January 19, 2008 sorry but thats html code which php is generating ......i need the php code <? ?> thanks. Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-443191 Share on other sites More sharing options...
resago Posted January 19, 2008 Share Posted January 19, 2008 In the code above, string concatenation is missing in the header() function try this code <?php if (isset($_GET['url'])) { header("Location : ".$_GET['url']; } ?> header("Location : ".$_GET['url']); http://roshanbh.com.np Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-443287 Share on other sites More sharing options...
resago Posted January 19, 2008 Share Posted January 19, 2008 heres what u want: <HTML> <head> <TITLE>DaDesiForum</TITLE> </head> <frameset rows="150,1*" border="0" frameborder="0" framespacing="0"> <frame align="center" src="redirect-ads.php" scrollbar="no"> <frame src="echo $_GET['url']"> </frameset> </HTML> and on the line: <frame align="center" src="redirect-ads.php" scrollbar="no"> Replace redirect-ads.php with the location of the page you want there =] Note: Some browsers dont support frames, but all the newer ones do =] <frame src="<?echo $_GET['url']?>"> Quote Link to comment https://forums.phpfreaks.com/topic/86601-redirectphp-code-4-forumz-header-ads/#findComment-443288 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.