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

Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1.     
    #1
    Banned
    Website's:
    WarezRelease.org ThatHosting.co

    Default Self Whitelisting Help

    hi

    Basicly ive added a whitelist page on my site and ive added a self whitelisting form,box nd buton so people can add sites anytime, heres my code so far:


    <?php

    $connect = mysql_connect ("localhost", "user", "pass") or die ('Connection Fail!');

    mysql_select_db("xtremedd_wcddl", $connect) or die ('lol');

    $add = mysql_query("INSERT INTO wcddl_whitelist VALUES ('$addsiteurl')");

    echo "Connected!"

    ?>

    can some1 correct me..
    Chris2k Reviewed by Chris2k on . Self Whitelisting Help hi Basicly ive added a whitelist page on my site and ive added a self whitelisting form,box nd buton so people can add sites anytime, heres my code so far: <?php $connect = mysql_connect ("localhost", "user", "pass") or die ('Connection Fail!'); mysql_select_db("xtremedd_wcddl", $connect) or die ('lol'); Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Retired NinJa
    Website's:
    loledhard.com
    well lets go in algorithmic path...
    • Check if that site is already whitelisted or not.
    • If not whitelisted, chk the site for link back.
      If whitelisted display "Already in Whitelist".
    • If linkback found, add to whitelist table
      If no link back, display "No Link Back"


    lets code it....
    PHP Code: 
    $sitename $_POST['sitename'];
    $connect mysql_connect ("localhost""user""pass") or die ('Connection Fail!');
    mysql_select_db("xtremedd_wcddl"$connect) or die ('lol');
    $x mysql_query("select count(*) from wcddl_whitelist where sitename = ".trim($sitename));
    if (
    $x==1)
    {
      die (
    "Already Whitelisted");
    }
    elseif (
    $x==0)
    {
      
    //curl_part to retrieve content from the said sitename & chk for link back 
      
    if($linkback==true)
      {
        
    $add mysql_query("INSERT INTO wcddl_whitelist VALUES ('".$sitename."')");
        echo 
    "Whitelisted!"
      
    }
      else
      {
        die(
    'No Link Back');
      }

    This is just rough module, havent cheked it or anything. May be some mistakes which would be easy to rectify if u know some PHP Hope this helps

    u have to still write in curl part in that code. where i have commented //curl_part



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

  4.     
    #3
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    yes humour thats wot im aiming for m8.

    __________________
    Added after 1 Day 19 Hours:

    ok here what i got;

    Code: 
    <?php
    
    $siteurl = $_POST['siteurl'];
    
    $connect = mysql_connect ("localhost", "user", "p/w") or die ('Connection Fail!');
    
        mysql_select_db("xtremedd_wcddl", $connect) or die ('Database not found!');
        
        $check = mysql_query("select count(*) from wcddl_whitelist where url = ('$siteutl')");
    
        if ($check==1)
        {
        die ("Already Whitelisted");
        }
        elseif ($check==0)
    {
        { 
        $add = mysql_query("INSERT INTO wcddl_whitelist (`url`) VALUES ('$siteurl')") or die ("Unable");
         
        echo "Connected!"
        }
    }
    ?>
    im gettin this error;


    Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/xtremedd/public_html/addme.php on line 21

    any1 can help?


    updated with error

  5.     
    #4
    Retired NinJa
    Website's:
    loledhard.com
    echo "Connected!"

    add semicolon at end



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

  6.     
    #5
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    did tht humour, now no error shows jus a blank page and the cccode isnt worrkin

  7.     
    #6
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Quote Originally Posted by Chris2009 View Post
    did tht humour, now no error shows jus a blank page and the cccode isnt worrkin
    I haven't tried it yet.
    But in ur edited php code. there's a error. Will install wcddl to check it.
    On line 9

    PHP Code: 
        $check mysql_query("select count(*) from wcddl_whitelist where url = ('$siteutl')"); 
    It should be:

    PHP Code: 
        $check mysql_query("select count(*) from wcddl_whitelist where url = ('$siteurl')"); 
    Note: $siteutl to $siteurl

  8.     
    #7
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    done it, here my final code;

    Code: 
    <?php
    
    $siteurl = $_POST['siteurl'];
    
    $connect = mysql_connect ("localhost", "user", "p/w") or die ('Connection Fail!');
    
        mysql_select_db("xtremedd_wcddl", $connect) or die ('Database not found!');
        
        $check = mysql_query("select count(*) from wcddl_whitelist where url = ('$siteurl')") or die ("Already Whitelisted"); // Checks the whitelist to see if ur URL is already there.
        
        $add = mysql_query("INSERT INTO wcddl_whitelist (`url`) VALUES ('$siteurl')") or die ("Already Whitelisted");
         
        echo "You have been added to the whitelist!"
    ?>
    now can some1 help medo, ccheck da sittte for linkback?

  9.     
    #8
    Retired NinJa
    Website's:
    loledhard.com
    link back part should be easy, lets make a function to return true or false based on linkback

    PHP Code: 
    function linkback($link$ururl

        
    $ch curl_init($link); 
        
    curl_setopt($chCURLOPT_RETURNTRANSFER1); 
        
    curl_setopt($chCURLOPT_HEADER0); 
        
    curl_setopt($chCURLOPT_FOLLOWLOCATION1); 
        
    curl_setopt($chCURLOPT_USERAGENT'Opera/9.80 (Windows NT 5.1; U; en) Presto/2.7.62 Version/11.01'); 
        
    $page curl_exec($ch); 
        
    curl_close($ch);
        if (
    strpos($page,ururl)===false)
          return 
    false;
        else
          return 
    true




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

  10.     
    #9
    Member
    I guess if the link back are commented will be accepted too
    <!--LINK to Site--> //are accepted

    Try always validate the users input data, never forget to safe the query's

    PHP Code: 
    $siteurl $_POST['siteurl']; //need be in http 
    $siteurl parse_url(trim($siteurl)); //remove spaces split the url
    $siteurl $siteurl['host']; //get host
    $siteurl str_replace("www.","",$siteurl); //remove the www
    $ipAddress gethostbyname($siteurl);
    if(
    $ipAddress === $siteurl//validate if real the site exists

    INSERT INTO wcddl_whitelist (`url`) VALUES ('$siteurl')

    INSERT INTO wcddl_whitelist (`url`) VALUES ('".mysql_real_escape_string($siteurl)."'//avoiding the sql injections are always an good idea 


  11.     
    #10
    Retired NinJa
    Website's:
    loledhard.com
    ^
    Have u just copy pasted it or something, y would one need to know the IP ?

    this part is helpful thou coz WCDDL saves hostname only
    PHP Code: 
    $siteurl $_POST['siteurl']; //need be in http 
    $siteurl parse_url(trim($siteurl)); //remove spaces split the url
    $siteurl $siteurl['host']; //get host 



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

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Whitelisting with Zunox Help
    By blankshare in forum Technical Help Desk Support
    Replies: 2
    Last Post: 13th Dec 2011, 02:01 AM
  2. Mechoddl whitelisting
    By lukip006 in forum Forum and DDL Discussion
    Replies: 2
    Last Post: 3rd Jul 2011, 09:14 AM
  3. [Buying] Need WCDDL mod (Self Whitelisting)
    By mannNmeet in forum Completed Transactions
    Replies: 1
    Last Post: 24th Apr 2011, 09:16 AM
  4. [Official] DDL0.com Whitelisting & Re-Rating (Apply Here)
    By SJshah in forum Forum and DDL Discussion
    Replies: 220
    Last Post: 1st Feb 2011, 12:16 AM
  5. Whitelisting.
    By CyberPirate in forum Forum and DDL Discussion
    Replies: 9
    Last Post: 4th Mar 2010, 11:12 AM

Tags for this Thread

BE SOCIAL