Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2006-11-29, 11:45 AM   #1
Beenie
Shut up brain, or I'll stab you with a Q-tip!
 
Join Date: Sep 2003
Location: Acapulco, Mexico
Posts: 117
Send a message via ICQ to Beenie
Using php redirects for sponsor links

I wanted to setup some php redirects for sponsor links but can't seem to get it working. Can anyone lend me a hand?
I've put this in a .php file
Code:
<?php header(’Location: http://www.link.com/') ; ?>
But when I hit the link nothing happends and I just see a blank page.
What am I doing wrong or is there another way to do this?

This ofcourse will not track anything but just function as a simple redirect. Are there any scripts out there that can actually track hits but still make links like domain.com/go/paysitename.php ?

Any help will be appreciated.
__________________
Submit your freesites to AcaLinks.com
- Linktrades? ICQ: 52-837-348
Beenie is offline   Reply With Quote
Old 2006-11-29, 02:49 PM   #2
tickler
If there is nobody out there, that's a lot of real estate going to waste!
 
tickler's Avatar
 
Join Date: Dec 2003
Posts: 2,177
I generally load the link(random) to a variable first.
PHP Code:
<? 
$GOTO_URL 
"http://www.link.com/";
header("Location: ".$GOTO_URL);
?>
</HTML></BODY>
__________________
Latina Twins, Solo, NN, Hardcore
Latin Teen Cash
tickler is offline   Reply With Quote
Old 2006-12-01, 01:45 PM   #3
oast
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
 
oast's Avatar
 
Join Date: May 2004
Location: UK
Posts: 316
Quote:
Originally Posted by Beenie View Post
I wanted to setup some php redirects for sponsor links but can't seem to get it working. Can anyone lend me a hand?
I've put this in a .php file
Code:
<?php header(’Location: http://www.link.com/') ; ?>
But when I hit the link nothing happends and I just see a blank page.
What am I doing wrong or is there another way to do this?

This ofcourse will not track anything but just function as a simple redirect. Are there any scripts out there that can actually track hits but still make links like domain.com/go/paysitename.php ?

Any help will be appreciated.
It all looks OK, except the symbol before the 'Location' is not the same as that at the end.
Should be either an apostrophe ( ' ) or a quotation mark ( " ), just as long as they are the same.

As far as scripts go, you can do what you are already doing or use .htaccess:

Assuming you own the site 'http://www.yoursite.com/'

If you want to link to 'Paysite Name', create a link on your site to point to http://www.yoursite.com/paysitename/

Utilising your current method would be to make a folder called 'paysitename'.
In the folder you would put an 'index.php' file with the following single line
PHP Code:
<?php header('Location:http://www.paysite.com/trackingurl.html');?>
To use .htaccess, add the following line to your .htaccess file
Code:
RewriteRule ^paysitename/? http://www.paysite.com/trackingurl.html [L,R]
You can put as many of these in your .htaccess as you like, just as long as they are unique.

HTH
~Steve
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare.
oast is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:21 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc