13:59 Mon Sep  3, 2007
Cheap Hummer!

12:18 Tue Jul  4, 2006
Hummer Camp After

12:15 Tue Jul  4, 2006
Hummer Camp

Help Me Humpa
PHP and MMS Server Help
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


goto.php

 
Post new topic   Reply to topic    Help Me Humpa Forum Index -> Anything PHP
View previous topic :: View next topic  
Author Message
dacool25



Joined: 29 Apr 2007
Posts: 60

PostPosted: Wed May 30, 2007 6:22 pm    Post subject: goto.php Reply with quote

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
View user's profile Send private message
Humpa
Site Admin


Joined: 06 Nov 2005
Posts: 10258

PostPosted: Wed May 30, 2007 6:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
dacool25



Joined: 29 Apr 2007
Posts: 60

PostPosted: Wed May 30, 2007 6:43 pm    Post subject: Reply with quote

beerchug

Humpa, You're truely the man
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Help Me Humpa Forum Index -> Anything PHP All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum