I have a php
script the generates links where-by the URL
is very long (too long for IE to handle infact) such as www.somesite.co.uk/here/query?foo=bar&bar=foo&.....
where somesite.co.uk
gets
the values (which I can't change to post
).
So in my index.php
:
echo "<a href='$url'>".$link."</a>";
All works fine for values of $url
that are under the limit the page is seen as expected however if over the limit the data on the page is truncated.
I created this long_url_test.php
script and it's loads the page as expected for long values of $url
<?php
header('Location: $url');
?>
I need help putting this all together, something like:
index.php:
echo "<a href='long_url_test.php'>".$link."</a>"; # and POST $url to script
long_url_test.php:
<?php
$url=$_POST['url']
header('Location: $url');
?>
Where the link displayed on index.php
posts
the url to long_url_test.php
which fetches the actual required page, or indeed is there a better/easier way I should do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…