If you have a bunch of these that you want to be able to send off
with short URLs, you could do this:
<?php
//save this as go.php or something else short
$to = (isset($_GET['to'])) ? $_GET['to'] : null;
$urls=array(
'http://example.com/some/long/path',
'http://example.com/some/other/path',
'http://example.com/somewhere/else'
);
if(array_key_exists($to,$urls){
header('Location: ' . $urls[$to]);
exit;
}else{
header('Location: http://yoursite.com');
exit;
}
?>
Now to access these, you simply create a manual link to go.php?to=0
to pick the first option in the array, go.php?to=2
to pick the
third option, etc.
When constructing the array, make sure you put a comma after each
option EXCEPT the last one. It should look like this: one,two,three
if you made it all on one line.
Make this file with a good plain-text editor, like TextMate or BBEdit
or TextWrangler. Don’t use Word or any other “rich” editor, unless
you like error messages. Upload it to your web folder on your site.
Now you don’t have to make your Freeway pages into php pages, you
just need this one “hub” page to do the redirecting for you.
Walter
On Apr 30, 2008, at 6:27 PM, Waylen wrote:
update: I found a page action “timed redirect” this is an ok
solution, but if there is a way to do it with php, then that would
be great. I am looking to conceal the link from the status bar and
from momentarily flashing on the browser bar. I understand this
can be done with php but not with a javascript or metarefresh since
these actions are handled by the users browser and php would be
handled by my server. I found this bit of script online for a php
header is there a way to add it in markup on the page? Also I tried
to save a pages file extension to .php instead of .html and in
preview it just shows a lot of code. Any help would be great!
really floundering with this the last few hours.
php script I found
<?php header( 'Location: http://www.myaffiliatelink.com' ) ;?>
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options