Results 1 to 10 of 20
-
20th Dec 2011, 04:53 PM #1OPBannedWebsite's:
WarezRelease.org ThatHosting.cowcddl check
how can i say:
PHP Code:if ($surl == blah.****** or blah****) {
// do this
} else if ($surl == blah.blogspot.com) {
// do this
}
Chris2k Reviewed by Chris2k on . wcddl check how can i say: if ($surl == blah.****** or blah****) { // do this } else if ($surl == blah.blogspot.com) { // do this } where blah can be anything, i though maybe a 2 preg's will do it.......... Rating: 5
-
20th Dec 2011, 05:01 PM #2Too busy :|Website's:
L337Fx.com BeastieBay.netWhy are you using preg_match for just checking the URL ?
Do a string manipulation technique like,
PHP Code:<?php
$string = "This is a strpos() test";
$pos = strpos($string, "This");
if ($pos == false) {
print "Not found brah ! :/";
} else {
echo "Found! MOOLAH !";
}
?>
PHP Code:
$invalidTLD = array(".blogspot.com", ". t k", ".c o . c c");
$urlchecks = NULL;
foreach ($urlchecks as $urlCheck) {
$urlCheck = strpos($surl, $invalidTLD);
}
if($urlCheck == FALSE) {
// Do whatever you want :D its not a free domain ;)
}
else {
// Its a free domain BOO !
}
-
20th Dec 2011, 05:06 PM #3Retired NinJaWebsite's:
loledhard.com
-
20th Dec 2011, 08:53 PM #4OPBannedWebsite's:
WarezRelease.org ThatHosting.coum, blAze im no php pro either btw the php u say looks to me as if its chcking the pge..
correct me if im wrong.
@humour yea bro, can i do:
PHP Code:if (preg_match('/http:\/\/[a-zA-Z0-9.]+\[b].blogspot[/b].[a-z]+/i')) {
// do this
} else if (preg_match('/http:\/\/[a-zA-Z0-9.]+\[b].t k[/b].[a-z]+/i')) {
// do this
} else if (preg_match('/http:\/\/[a-zA-Z0-9.]+\[b].c o . c c[/b].[a-z]+/i')) {
// do this
}
-
21st Dec 2011, 12:47 PM #5Respected MemberWebsite's:
DL4Everything.com Soft2050.inRegex ftw
Use this php function:
PHP Code:function checkdom($url) {
// Soft2050
return preg_match('@^(?:http:\/\/)?([^/]+)\.(blogspot\.com|co\.cc|tk)@i', $url);
}
PHP Code:<?php
function checkdom($url) {
// Soft2050
return preg_match('@^(?:http:\/\/)?([^/]+)\.(blogspot\.com|co\.cc|tk)@i', $url);
}
$url = 'http://google.******';
if (checkdom($url)) {
echo 'Oopz! The site is not allowed to submit!';
} else {
echo 'Yooo! U win, your site is allowed to submit. Dance around';
}
?>
-
21st Dec 2011, 02:48 PM #6OPBannedWebsite's:
WarezRelease.org ThatHosting.coYo Soft, ty
Hmm I want to do .blogspot.com seperately from .t k nd . c o . c c bud maybe add 2x preg's.
Plus $url = $_POST['surl']; so i dunno how i'd do tat.?
-
21st Dec 2011, 02:58 PM #7Retired NinJaWebsite's:
loledhard.comy do u want to make diff preg_matches ? if the concept is same to blacklist them,
You don't hate Justin bieber.You hate the fact you ain't Justin Bieber!
-
21st Dec 2011, 03:09 PM #8OPBannedWebsite's:
WarezRelease.org ThatHosting.cobecause i have 1 reason fo0r .blogspot and a differ for the others,
-
21st Dec 2011, 04:53 PM #9OPBannedWebsite's:
WarezRelease.org ThatHosting.coHey
modifeid it softy m8
PHP Code:
-
21st Dec 2011, 04:59 PM #10Respected MemberWebsite's:
DL4Everything.com Soft2050.inAdd any other domain extension in the regex:
PHP Code:(co\.cc|tk)
PHP Code:@^(?:http:\/\/)?([^/]+)\.(blogspot\.com|co\.cc|tk)@i
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Check this out
By King K*** in forum IntroductionsReplies: 3Last Post: 7th Dec 2011, 01:02 PM -
Check It Out
By DeathNote in forum Site ReviewsReplies: 0Last Post: 5th Nov 2010, 04:31 AM -
Lol so..check this out?
By DXS in forum General DiscussionReplies: 21Last Post: 2nd Jun 2010, 05:32 PM -
Check out my new DDL
By CZhakis in forum Site ReviewsReplies: 4Last Post: 24th Aug 2009, 11:10 AM -
Automatically check for a blacklink for WCDDL
By litewarez in forum Completed TransactionsReplies: 2Last Post: 26th Nov 2008, 09:56 PM
themaCreator - create posts from...
Version 3.45 released. Open older version (or...