Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-25-2003, 04:20 PM   #1
AkiraSS
Confirmed User
 
Join Date: Jan 2003
Location: ICQ: 17630227
Posts: 2,988
Php programmers - Regarding a php redirect script, can you help me make adjustments?

Hi, I would like to ask for free help from any expert out there. I have a gallery submitted that uses links with php redirect way.

EG my sponsor code on the gallery is in the format

"redirect.php?id=XXX"


Here is the source code of the PHP file

<?php
switch($HTTP_GET_VARS["id"]){
case 0: $url = "http://www.sponsor1.com/"; break;
case 1: $url = "http://www.sponsor1.com/"; break;
case 2: $url = "http://www.sponsor1.com/"; break;
}
header("Location: $url");
?>


What I want is, when ever a surfer follows a

"redirect.php?id=1" another link to open for him too, like a blur window or pop under?


Any way I can achieve this?


Thanks up front
AkiraSS is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2003, 05:05 PM   #2
keyDet79
Confirmed User
 
Join Date: Feb 2003
Location: Netherlands
Posts: 1,109
PHP Code:
switch($HTTP_GET_VARS["id"]){ 
case 
0$url "http://www.sponsor1.com/"; break; 
case 
1$url "http://www.sponsor1.com/"; break; 
case 
2$url "http://www.sponsor1.com/"; break; 
}

echo
'
html code
to pop something up
here
'
;

header("Location: $url"); 
?> 
Or put all your html in a file called popup.htm and then:

PHP Code:
switch($HTTP_GET_VARS["id"]){ 
case 
0$url "http://www.sponsor1.com/"; break; 
case 
1$url "http://www.sponsor1.com/"; break; 
case 
2$url "http://www.sponsor1.com/"; break; 
}

include 
"popup.htm";

header("Location: $url"); 
?> 
Contact me if you need some serious code done.
__________________

Multihomed quality BW for less
ICQ 51034232 - MSN [email protected] - Email keydet(at)vibehosting.com

Last edited by keyDet79; 03-25-2003 at 05:08 PM..
keyDet79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2003, 05:08 PM   #3
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Quote:
Originally posted by keyDet79
PHP Code:
switch($HTTP_GET_VARS["id"]){ 
case 
0$url "http://www.sponsor1.com/"; break; 
case 
1$url "http://www.sponsor1.com/"; break; 
case 
2$url "http://www.sponsor1.com/"; break; 
}

echo
'
html code
to pop something up
here
'
;

header("Location: $url"); 
?> 
That won't work. You can't send html before a "header" command. You'll get the "headers already sent" error, for obvious reasons.
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2003, 05:09 PM   #4
keyDet79
Confirmed User
 
Join Date: Feb 2003
Location: Netherlands
Posts: 1,109
Quote:
Originally posted by punkworld


That won't work. You can't send html before a "header" command. You'll get the "headers already sent" error, for obvious reasons.
You are right, use this instead for redirection:

PHP Code:
echo '<meta http-equiv="refresh" content="0; URL='.$url'">'
__________________

Multihomed quality BW for less
ICQ 51034232 - MSN [email protected] - Email keydet(at)vibehosting.com
keyDet79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2003, 05:10 PM   #5
keyDet79
Confirmed User
 
Join Date: Feb 2003
Location: Netherlands
Posts: 1,109
double post..
__________________

Multihomed quality BW for less
ICQ 51034232 - MSN [email protected] - Email keydet(at)vibehosting.com
keyDet79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2003, 05:21 PM   #6
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Best way to do it would send the surfer to a html page with popup code and a hahahahahahahahahaha redirect.

Something like:
PHP Code:
<?php
switch($HTTP_GET_VARS["id"]){ 
case 
0$url "http://www.sponsor1.com/"; break; 
case 
1$url "http://www.sponsor1.com/"; break; 
case 
2$url "http://www.sponsor1.com/"; break; 

?>
<html>
<head>

hahahahahahahaha language="hahahahahahahahahaha">
<!--
function doit(){
var popup = window.open('http://www.whatever.com');
popup.blur();
top.location = '<?php echo($url);?>';
}
//-->
</hahahahahahahaha
</head>
<body onload="doit()">
<a href="<?php echo($url); ?>">Click here if you are not redirected automatically</a>
</body>
</html>
SOmething like that anyway.
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-25-2003, 07:48 PM   #7
AkiraSS
Confirmed User
 
Join Date: Jan 2003
Location: ICQ: 17630227
Posts: 2,988
Thanks for trying punkworld

Unfortunately I couldn't get it to work,
tried your way, and tried this too:


<?php

switch($HTTP_GET_VARS["id"]){

case*0:*$url*=*"http://www.sponsor1.com/";*break;

case*1:*$url*=*"http://www.sponsor1.com/";*break;

case*2:*$url*=*"http://www.sponsor1.com/";*break;

}

?>

<html>
<head>
hahahahahahahaha language="hahahahahahahahahaha">
<!--
function doit(){
myWin = window.open('','my_console', 'toolbar=1,menubar=1,scrollbars=1,status=1,resizab le=1');
myWin.blur();
myWin.location ='http://www.popurl.com';
top.location = '<?php*echo($url);?>';
}
//-->
</hahahahahahahaha
</head>
<body onload="doit()">
<a href="<?php*echo($url);*?>">Click here for redirect</a>
</body></html>


I get redirected but new window with the pop under doesn't open
AkiraSS is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.