Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Proxy Supply .com - New Proxy Listing Site

  1. #21
    Habaku's Avatar
    Habaku is offline Newbie Net Builder
    Join Date
    May 2009
    Posts
    452
    Thanks
    101
    Thanked 48 Times in 41 Posts
    Quote Originally Posted by nux View Post
    Thanks! That's silly - I can't believe I missed that. Here's a quicker way to do that using stristr, a case insensitive strstr:

    if (stristr($url['host'], ".tk")) // Block the free TLD .tk
    $errors[] = 'The TLD .tk is not allowed. Please try again';

    Your solution is very elegant! Thanks for shortening the code; I knew there would be an easier way such as you did, but it's been some time since I did programming and never done php.

  2. #22
    solidstate's Avatar
    solidstate is offline Next Target $2000
    Join Date
    Dec 2008
    Posts
    246
    Thanks
    20
    Thanked 10 Times in 10 Posts

  3. #23
    tibbie1 is offline Newbie Net Builder
    Join Date
    Jan 2013
    Location
    New Zealand
    Posts
    28
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi, where exactly do you put the codein the submit-proxy.php file? Have tried in all sort of places without luck. Mainly get a blank screen.
    thanks
    Quote Originally Posted by nux View Post
    Thanks! That's silly - I can't believe I missed that. Here's a quicker way to do that using stristr, a case insensitive strstr:

    if (stristr($url['host'], ".tk")) // Block the free TLD .tk
    $errors[] = 'The TLD .tk is not allowed. Please try again';

  4. #24
    UncleP's Avatar
    UncleP is offline The perfect face for radio
    Join Date
    Nov 2009
    Location
    Blighty
    Posts
    218
    Thanks
    20
    Thanked 91 Times in 61 Posts
    I put mine right after the "$url['host'] = strtolower($url['host']); //lets beat those bloody spammers" part, no need to check for Caps on or off then. I added my extra code in at around line 71 (on v2.6 of original code) Note: mine's not exactly the same as the original submit-proxy.php file but I have other bits added too like https support (see if you can spot it in the code below ). Here's a copy 'n paste of part of my code with the 'free domains block' stuff in bold, you don't have to have so many of course, pick and choose what you wish to use. It works for me.

    Code:
        if (!$found)
            $errors[] = 'Please select the correct category.';
            $ipaddress = $_SERVER['REMOTE_ADDR'];
            mysql_query("INSERT INTO pl_track (post, time, email, ip) VALUES ('$proxy','".time()."','$email','$ipaddress')") or die(mysql_error());//track what people post    
        $url = @parse_url($proxy);
    
        if (!isset($url['host']))
            $errors[] = 'ERROR: The website address has to be a valid domain name.';
        
        if (strtoupper($url['scheme']) == 'HTTP' || strtoupper($url['scheme']) == 'HTTPS'){
            # Do nothing
      }
      else{
        $errors[] = '<br />The website address has to start with either http:// or https://';
      }
    
        $url['host'] = strtolower($url['host']); //lets beat those bloody spammers
        
        if (strstr($url['host'], ".vu")) // Block the free TLD .vu
            $errors[] = 'ERROR: Sorry &quot;.vu&quot; domains are not currently supported.';
    
        if (strstr($url['host'], ".mn")) // Block the free TLD .mn
            $errors[] = 'ERROR: Sorry &quot;.mn&quot; domains are not currently supported.';
          
          if (strstr($url['host'], ".tc")) // Block the free TLD .tc
            $errors[] = 'ERROR: Sorry  &quot;.tc&quot; domains are not currently supported.';    
    
        if (strstr($url['host'], ".tk")) // Block the free TLD .tk
            $errors[] = 'ERROR: Free &quot;.tk&quot; domains are not currently accepted.';
    
        if (strstr($url['host'], ".co.cc")) // Block the free SLD .co.cc
            $errors[] = 'ERROR: Free &quot;.co.cc&quot; domains are not currently accepted.';
            
        if (strstr($url['host'], ".cu.cc")) // Block the free SLD .cu.cc
            $errors[] = 'ERROR: Free &quot;.cu.cc&quot; domains are not currently accepted.';
    
        if (strstr($url['host'], ".co.tv")) // Block the free SLD .co.tv
            $errors[] = 'ERROR: Free &quot;.co.tv&quot; domains are not currently accepted.';
    
        if (strstr($url['host'], ".cz.cc")) // Block the free SLD .cz.cc
            $errors[] = 'ERROR: Free &quot;.cz.cc&quot; domains are not currently accepted.';
            
        if (strstr($url['host'], ".vv.cc")) // Block the free SLD vv.cc
            $errors[] = 'ERROR: Free &quot;.vv.cc&quot; domains are not currently accepted.';
    
        if (strstr($url['host'], ".ce.ms")) // Block the free SLD .ce.ms
            $errors[] = 'ERROR: Free &quot;.ce.ms&quot; domains are not currently accepted.';
    
        if (strstr($url['host'], ".cn")) // Block the TLD .cn
            $errors[] = 'ERROR: Sorry &quot;.cn&quot; domains are not currently supported.';
    
        if (!$errors && $cfg['checkwhoanswers']) {
            $checkch = curl_init();
            curl_setopt($checkch, CURLOPT_FOLLOWLOCATION, true);
            curl_setopt($checkch, CURLOPT_MAXREDIRS, 20);
            curl_setopt($checkch, CURLOPT_TIMEOUT, 30);
            curl_setopt($checkch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($checkch, CURLOPT_URL, $proxy);
            $check_data = curl_exec($checkch);
            if (!$check_data) {
                $errors[] = 'We were unable to connect back to your proxy to verify it.';
            } else {
                $actual_url = curl_getinfo($checkch, CURLINFO_EFFECTIVE_URL);
                $original_proxy = $proxy;
                $proxy = $actual_url;
                $original_url = $url;
                $url = @parse_url($proxy);
            }
            curl_close($checkch);
        }
    If you get a blank page afterwards then there's either a dot/comma/colon/semi-colon/apostrophe or similar character missing or the file was corrupted when it saved (happened to me several times) but editing with gedit or notepad++ seems to work OK, although I use MS FrontPage usually.
    If I can't be a good example, I'll just have to be a terrible warning...

  5. Thanked by:

    tibbie1 (13 January, 2013)

  6. #25
    tibbie1 is offline Newbie Net Builder
    Join Date
    Jan 2013
    Location
    New Zealand
    Posts
    28
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Wonderful! Worked perfectly and first time!

    thanks you - you are the man!

    Quote Originally Posted by UncleP View Post
    I put mine right after the "$url['host'] = strtolower($url['host']); //lets beat those bloody spammers" part, no need to check for Caps on or off then. I added my extra code in at around line 71 (on v2.6 of original code) Note: mine's not exactly the same as the original submit-proxy.php file but I have other bits added too like https support (see if you can spot it in the code below ). Here's a copy 'n paste of part of my code with the 'free domains block' stuff in bold, you don't have to have so many of course, pick and choose what you wish to use. It works for me.

    Code:
        if (!$found)
            $errors[] = 'Please select the correct category.';
            $ipaddress = $_SERVER['REMOTE_ADDR'];
            mysql_query("INSERT INTO pl_track (post, time, email, ip) VALUES ('$proxy','".time()."','$email','$ipaddress')") or die(mysql_error());//track what people post    
        $url = @parse_url($proxy);
    
        if (!isset($url['host']))
            $errors[] = 'ERROR: The website address has to be a valid domain name.';
        
        if (strtoupper($url['scheme']) == 'HTTP' || strtoupper($url['scheme']) == 'HTTPS'){
            # Do nothing
      }
      else{
        $errors[] = '<br />The website address has to start with either http:// or https://';
      }
    
        $url['host'] = strtolower($url['host']); //lets beat those bloody spammers
        
        if (strstr($url['host'], ".vu")) // Block the free TLD .vu
            $errors[] = 'ERROR: Sorry &quot;.vu&quot; domains are not currently supported.';
    
        if (strstr($url['host'], ".mn")) // Block the free TLD .mn
            $errors[] = 'ERROR: Sorry &quot;.mn&quot; domains are not currently supported.';
          
          if (strstr($url['host'], ".tc")) // Block the free TLD .tc
            $errors[] = 'ERROR: Sorry  &quot;.tc&quot; domains are not currently supported.';    
    
        if (strstr($url['host'], ".tk")) // Block the free TLD .tk
            $errors[] = 'ERROR: Free &quot;.tk&quot; domains are not currently accepted.';
    
        if (strstr($url['host'], ".co.cc")) // Block the free SLD .co.cc
            $errors[] = 'ERROR: Free &quot;.co.cc&quot; domains are not currently accepted.';
            
        if (strstr($url['host'], ".cu.cc")) // Block the free SLD .cu.cc
            $errors[] = 'ERROR: Free &quot;.cu.cc&quot; domains are not currently accepted.';
    
        if (strstr($url['host'], ".co.tv")) // Block the free SLD .co.tv
            $errors[] = 'ERROR: Free &quot;.co.tv&quot; domains are not currently accepted.';
    
        if (strstr($url['host'], ".cz.cc")) // Block the free SLD .cz.cc
            $errors[] = 'ERROR: Free &quot;.cz.cc&quot; domains are not currently accepted.';
            
        if (strstr($url['host'], ".vv.cc")) // Block the free SLD vv.cc
            $errors[] = 'ERROR: Free &quot;.vv.cc&quot; domains are not currently accepted.';
    
        if (strstr($url['host'], ".ce.ms")) // Block the free SLD .ce.ms
            $errors[] = 'ERROR: Free &quot;.ce.ms&quot; domains are not currently accepted.';
    
        if (strstr($url['host'], ".cn")) // Block the TLD .cn
            $errors[] = 'ERROR: Sorry &quot;.cn&quot; domains are not currently supported.';
    
        if (!$errors && $cfg['checkwhoanswers']) {
            $checkch = curl_init();
            curl_setopt($checkch, CURLOPT_FOLLOWLOCATION, true);
            curl_setopt($checkch, CURLOPT_MAXREDIRS, 20);
            curl_setopt($checkch, CURLOPT_TIMEOUT, 30);
            curl_setopt($checkch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($checkch, CURLOPT_URL, $proxy);
            $check_data = curl_exec($checkch);
            if (!$check_data) {
                $errors[] = 'We were unable to connect back to your proxy to verify it.';
            } else {
                $actual_url = curl_getinfo($checkch, CURLINFO_EFFECTIVE_URL);
                $original_proxy = $proxy;
                $proxy = $actual_url;
                $original_url = $url;
                $url = @parse_url($proxy);
            }
            curl_close($checkch);
        }
    If you get a blank page afterwards then there's either a dot/comma/colon/semi-colon/apostrophe or similar character missing or the file was corrupted when it saved (happened to me several times) but editing with gedit or notepad++ seems to work OK, although I use MS FrontPage usually.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. [WTS] Proxy Template Download Site cum Proxy Listing
    By AstroNyu in forum Sites
    Replies: 0
    Last Post: 1 September, 2010, 01:26 AM
  2. [WTS] PR4 Proxy Listing Site
    By geeknb in forum Sites
    Replies: 2
    Last Post: 10 August, 2010, 12:03 PM
  3. Replies: 2
    Last Post: 1 April, 2010, 15:51 PM
  4. [WTS] Proxy listing site The Proxy Finder PR3
    By Ogle in forum Sites
    Replies: 5
    Last Post: 16 December, 2009, 09:16 AM
  5. Please Review My Proxy Listing Site !
    By WebEvader in forum Site Reviews
    Replies: 13
    Last Post: 11 April, 2009, 23:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •