| View previous topic :: View next topic |
| Author |
Message |
dacool25
Joined: 29 Apr 2007 Posts: 60
|
Posted: Wed May 30, 2007 6:22 pm Post subject: goto.php |
|
|
Hi Humpa. I've asked you this before, and i could of swore that it was on this forum, but i searched and couldn't find it. I'm trying to use my own wap page, very similar to yours but can't nail down the goto.php page. When i type in a link it just goes to the goto.php page and not the actual website.
Here are some of my current codes:
This is on the bottom of my index.html page:
| Code: |
<form action="goto.php" method="post">
URL: <input name="url" value=""><br>
<input type="submit" value="Go To URL">
</form> |
And this is in my goto.php file:
| Code: |
<?php
if($url != "") {
if(eregi("https",$url)) {
header("Location: $url");
die();
}elseif(eregi("http",$url)) {
header("Location: $url");
die();
}else {
$url = "http://$url";
header("Location: $url");
die();
}
}
?> |
|
|
| Back to top |
|
 |
Humpa Site Admin

Joined: 06 Nov 2005 Posts: 10258
|
Posted: Wed May 30, 2007 6:33 pm Post subject: |
|
|
change your goto page to this:
| Code: |
<?php
$url = $_POST[url];
if($url != "") {
if(eregi("https",$url)) {
header("Location: $url");
die();
}elseif(eregi("http",$url)) {
header("Location: $url");
die();
}else {
$url = "http://$url";
header("Location: $url");
die();
}
}
?> |
|
|
| Back to top |
|
 |
dacool25
Joined: 29 Apr 2007 Posts: 60
|
Posted: Wed May 30, 2007 6:43 pm Post subject: |
|
|
Humpa, You're truely the man |
|
| Back to top |
|
 |
|