|
||||||
| PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
I have a proxy script and I want that the user inserts http:// before he surfs, but let's say he doesn't enter it I want it to be added, but if he doesn't I don't want to end up with http://http://www.website.com
So please can anyone help me? I have a text box in index.html to write the URL and then a php script to surf the website in a frame. Can anyone help please? Thanks. |
| Sponsored Links |
|
|
|
|||||
|
I have already done the one with the value, now I will try the other bit of code..
Will let you know, I'm trying it. *EDIT* Wow man, it works perfectly. if no URL is given it always displays that the URL is wrong, Thanks! I had to edit it a little bit, although I don't know any PHP, but I figured it out as I know some programming. Anyways thanks!! Last edited by TcM; 05-16-2007 at 10:41 AM. |
|
|||||
|
I'm glad, you could use it.
To make the validation for the input even more secure, try look into some Regular Expressions. It's a short, clean - but also a bit hard way to validate your input in only a line, or maybe a little more. There's tons of information about Regular Expressions "out there", and also for many different languages. A good place to start, would be here: Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns |
|
|||||
|
Quote:
Discovered one problem, it clashes with the Google Search of Adwords!! it displays invalid URL!! Last edited by TcM; 05-16-2007 at 10:57 AM. |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| JavaScript:Tutorial, Using an External Script | TcM | Javascript | 7 | 09-11-2007 08:39 AM |
| (Script) Copy content to clipboard, how? | annannienann | Visual Basic Programming | 0 | 06-19-2007 06:20 PM |
| Tutorial: Proxy Servers | Lop | Tutorials | 7 | 01-02-2007 04:53 AM |
| Proxy usage | TcM | Computer Software/OS | 2 | 11-02-2006 01:00 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 98%