Activity Stream
48,167 MEMBERS
6833 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1.     
    #1
    Banned
    Website's:
    WarezRelease.org ThatHosting.co

    Default wcddl check

    how can i say:

    PHP Code: 
    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..........
    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

  2.   Sponsored Links

  3.     
    #2
    Too busy :|
    Website's:
    L337Fx.com BeastieBay.net
    Why 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 !";
        }
    ?>
    If you are thinking to find all the .blogspots.com sites then do something like this:

    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 !


    something like that ? I'm not that good in PHP though

  4.     
    #3
    Retired NinJa
    Website's:
    loledhard.com
    Quote Originally Posted by BlaZe View Post
    Why 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 !";
        }
    ?>
    & how would u match a subdomain using stripos ?

    preg_match('/http:\/\/[a-zA-Z0-9.]+\.[a-z]+/i'); may be this would help



    You don't hate Justin bieber.You hate the fact you ain't Justin Bieber!

  5.     
    #4
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    um, 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

    Yep blaze i wanna blacklist all but individual .blogspot.com sites nd . t k nd c o . c c sites.

  6.     
    #5
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Regex ftw Use this php function:

    PHP Code: 
    function checkdom($url) {
        
    // Soft2050
        
    return preg_match('@^(?:http:\/\/)?([^/]+)\.(blogspot\.com|co\.cc|tk)@i'$url);

    Test PHP Code (Tested and working)
    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';
    }

    ?>

  7.     
    #6
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    Yo 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.?

  8.     
    #7
    Retired NinJa
    Website's:
    loledhard.com
    y 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!

  9.     
    #8
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    because i have 1 reason fo0r .blogspot and a differ for the others,

  10.     
    #9
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    Hey

    modifeid it softy m8

    PHP Code: 
     
    ^ not tested yet, btw how to add blogsspot

  11.     
    #10
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Add any other domain extension in the regex:

    PHP Code: 
    (co\.cc|tk
    The regex above did has blogspot
    PHP Code: 
    @^(?:http:\/\/)?([^/]+)\.(blogspot\.com|co\.cc|tk)@

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Check this out
    By King K*** in forum Introductions
    Replies: 3
    Last Post: 7th Dec 2011, 01:02 PM
  2. Check It Out
    By DeathNote in forum Site Reviews
    Replies: 0
    Last Post: 5th Nov 2010, 04:31 AM
  3. Lol so..check this out?
    By DXS in forum General Discussion
    Replies: 21
    Last Post: 2nd Jun 2010, 05:32 PM
  4. Check out my new DDL
    By CZhakis in forum Site Reviews
    Replies: 4
    Last Post: 24th Aug 2009, 11:10 AM
  5. Automatically check for a blacklink for WCDDL
    By litewarez in forum Completed Transactions
    Replies: 2
    Last Post: 26th Nov 2008, 09:56 PM

Tags for this Thread

BE SOCIAL