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
CE 7.1 and External GIS integration
Hi All,
Function
How can I make this function that once you click the link in the code it takes you to a new page without html but so the menu_name and content load in it.Code: function public_navigation($sel_subject
Login script (probably a simple error)
dbConfig.phpCode: <?// Replace the variable values below// with your specific database information.$host = "localhost";$user = "username";$pass = "password";$db
FROM_UNIXTIME($phpdate);
Hello, I tried to use this : $date = FROM_UNIXTIME($phpdate); ANd I was told that FROM_UNIXTIME() is an 'unidentified function'. Any ideas why this might be? I've used it before with no problems.
Day of week
I am using PHP version 5.0.5I have a varaible ($DATE (date format yyyy-mm-dd)) that is being incremented to populate a table with each day of the month. I am then trying to get the day of week
natcasesort works on one server but not on another
HiI have a problem that I was hoping that someone can help me with.I'm trying to use natcasesort() to sort an array. This works fine on my laptop (which I use for testing and which uses php 5.2.6),
small inaccuracies
I have this code to convert fractional base 10 into base 2: while($num > 0) { echo "<tr><td>". $num." * 2 =
Select Rows as Columns..
is there a way to select COLUMN_NAME from user_tab_columns where table_name='TABLENAME';
Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields but have a 30 sec execution limit on my host. im looking for advice on how to loop thrue up to 8
Variable uses and placement
I'm new to PL/SQL and am trying to learn about variable valid uses/placement (any pointers to any docs is appreciated...)