Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4229
Latest: Ghost
New This Month: 3
New This Week: 0
New Today: 0
Stats
Total Posts: 43074
Total Topics: 7493
Most Online Today: 108
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 38
Total: 38

Author Topic: Download System++ (php)  (Read 9810 times)

0 Members and 1 Guest are viewing this topic.

Offline rtyug

  • Member
  • *
  • Posts: 24
    • View Profile
Download System++ (php)
« on: December 21, 2007, 09:10:06 pm »
http://custom.simplemachines.org/mods/index.php?mod=992

very good system for files


It is needed to do determination of ip client which was connected and if this ip not included in the list of present networks that to forbid to begin to the swing and get files!!!
more detailed http://ua-ix.com/eng.phtml

I insert a code somewhere, but for me does not turn out to do!!
Code: [Select]
$ip = getenv('REMOTE_ADDR');                                                    


here code
Code: [Select]
<?
// wget http://www.colocall.net/ua/?list -O ua-list.txt

function parse_net($ip)
{
sscanf ($ip, "%d.%d.%d.%d/%d", $one, $two, $three, $four, $mask);
$addr = $one*pow(2,24) + $two*pow(2,16) + $three*pow(2,8) + $four;
for ($i = 0; $i < round($mask); $i++) $bitmask += 1 << (31 - $i);
return array($addr, $addr+abs($bitmask));
}

function parse_ip($ip)
{
sscanf ($ip, "%d.%d.%d.%d", $one, $two, $three, $four);
return $one*pow(2,24) + $two*pow(2,16) + $three*pow(2,8) + $four;
}
function check_ip($ip)
{
$f=file('ua-list.txt');
$IP=parse_ip($ip);
foreach ($f as $net)
{
list($min,$max)=parse_net(trim($net));
if ($IP>=$min && $IP<$max) return true;
}
return false;
}

$ip=$_SERVER["argv"][1];

if (check_ip($ip)) echo "OK - host '$ip' in UA-IX\n";
else echo "FALSE - host '$ip' NOT in UA-IX\n";

?>

вот код download.php

http://2info.dp.ua/403/download.txt


+ Downloads.english-utf8.php

« Last Edit: December 21, 2007, 09:17:38 pm by rtyug »

Offline rtyug

  • Member
  • *
  • Posts: 24
    • View Profile
Re: Download System++ (php)
« Reply #1 on: December 22, 2007, 10:16:37 am »
???????????
Code: [Select]
$ip = getenv('REMOTE_ADDR');
??????????
Code: [Select]
// Check if downloads are auto approved
    $approved = (allowedTo('downloads_autoapprove') ? 1 : 0);

    // Allow comments on file if no setting set.
    if (empty($modSettings['down_commentchoice']))
        $allowcomments = 1;


    if ($title == '')
        fatal_error($txt['downloads_error_no_title'],false);
    if ($cat == '')
        fatal_error($txt['downloads_error_no_cat'],false);

    if ($modSettings['down_set_enable_multifolder'])
        CreateDownloadFolder();

Offline rtyug

  • Member
  • *
  • Posts: 24
    • View Profile
Re: Download System++ (php)
« Reply #2 on: December 22, 2007, 12:36:04 pm »
if I got it right, a script is written very difficultly and done in order that did not break up a forum!!

he very needs me!
I thought that able to close access a method .htaccess, but did not turn out

it can be YOU something is not clear? and did I clear write as though...?

I wait an answer or will put to death itself at a wall  ;D
THANK YOU
« Last Edit: December 22, 2007, 01:33:10 pm by rtyug »

Offline rtyug

  • Member
  • *
  • Posts: 24
    • View Profile
Re: Download System++ (php)
« Reply #3 on: December 23, 2007, 10:35:30 am »
help please
 ;)
« Last Edit: December 23, 2007, 05:07:41 pm by rtyug »

Offline rtyug

  • Member
  • *
  • Posts: 24
    • View Profile
Re: Download System++ (php)
« Reply #4 on: December 23, 2007, 05:01:54 pm »
I did already! excuse me! I was nervous  :D
« Last Edit: December 23, 2007, 05:07:23 pm by rtyug »

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
3453 Views
Last post December 06, 2007, 02:50:35 pm
by biggsy
3 Replies
5435 Views
Last post February 08, 2008, 01:39:16 am
by rtyug
5 Replies
7457 Views
Last post September 26, 2008, 09:23:21 pm
by SMFHacks
4 Replies
6534 Views
Last post January 11, 2008, 02:15:38 pm
by rtyug
1 Replies
4153 Views
Last post February 07, 2008, 09:59:50 pm
by rtyug

+- Recent Topics

Version 6.1.6 issues by davejo
Today at 02:21:44 pm

Follow / Follower Mod? by SMFHacks
September 23, 2023, 08:44:44 am

Looking for a good video player by replayuk
September 23, 2023, 12:17:39 am

[Mod]Discord Web Hooks by SMFHacks
September 22, 2023, 03:57:28 pm

SMF 2.1.4 Search by Anmer
September 22, 2023, 01:55:15 pm

Error in thise mode by Ghost
September 15, 2023, 08:42:24 am

Gallery Selection List Order by mickjav
September 07, 2023, 12:46:31 pm

[Mod]Tidy Child Boards 2.0 by Norwinjose
September 02, 2023, 11:42:54 am

PrettyUrls SEO Pro: Unable to submit sitemap to google search conmsole by SMFHacks
August 31, 2023, 10:55:22 am

PrettyURL - SEO4SMF Rewrites? by SMFHacks
August 28, 2023, 06:35:33 pm

Powered by EzPortal