im trying to validate url's sent to me by a form
the url's im collecting are for placing banners on my site
so the url's are the link to there site and url of where there banner is
URL's ARE BROKEN INTO PARTs PROTOCOL/SUBDOMAIN/DOMAIN NAME/DIRECTORY/FILE
SO FAR I GOT
Code: if(!preg_match("/^http://www.[a-z0-9-].[a-z]{2,3}[a-z0-9/.] $/i", $_POST[url]))
This checks the form feild url
1) make sure http://www. is present (i dont see why it should be any different for the purpose of my use)
i wll be placing a warning on my form page that the urls must contains this
2) Then my code checks it consists of only letters,numbers,dashes/hythens i read these are the only characters a domain name can be
also they must start with a letter or number so how do i make that possible?
3) the next part makes sure theres a .
4) the next part makes sure it consists of only letter of 2-3 characters long
this only alows things such as .com or .ru
How do i alow multiple for example .co.uk
5) i then want to make the rest optional but to alow
letter/numbers/for directories . for start of ext
can anyone help me tweak my code to satisfy my needs but to be as strict as possible.
also knowing what my code is going to be checking is there any genuine urls that the code would refuse
or is there anything i need to know
having probem inserting data into db table
hii have a table with following columns in itCode: candidate_id, degree, cgpa, instituteand i have a dynamic form with some javascript in it. the problem in php script i think not in js. this form has
order by date not ID number help php
I am trying to orginize the following code to order by date not id number.any help would be greatCode: [Select]<?php // Status // 1. inshop // 2 in progress // 3 pending // 4 to be
Ajax Issues - Update Panel / Timer. Intellisense doesn't know about them
Type 'System.Web.UI.ScriptManager' does not have a public property named 'UpdatePanel'.
Why is this query failing?
Why is this not working?$query = "SELECT * FROM `users` WHERE `userid` = " . $USERID AND `pin` = " . $PIN;$result = mysql_query($query) or die("Web site query
Pipe email to PHP - get mail adress from MySQL - send?
Hi all,this is the challenge:1) Our faculty at the college where I'm employed includes quite a bit of freelancers that don't check the college mailbox quite as often as the administration would
quick question about System Change Number(SCN) in FlashBack Query topic
i know tht we can get the SCN of the database using flashback concept as follows
How do I give a developer access to a specific directory and nothing else?
I want to give a develop access to a specific directory and nothing elseI can give them an FTP account with access to a sub directory, but this doesn't exactly solve the problem!1. They can write PHP
DELETE rows based on content
I have a link in my rows$bit="http://bit.ly/abcd";$query = mysql_query("DELETE FROM *table* WHERE sentence........");//I need to delete all sentence rows which DOES NOT contain my
Can we convert non uni code system into unicode
Hi All,
pop3 and fsockopen
So I am able to connect to the pop3 server, log in, and check how many messages there are. I am having a problem with server responses though.In the following code, I don't understand why on the