Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 175
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 152
Total: 152

Author Topic: Download System++ (php)  (Read 10733 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
4190 Views
Last post December 06, 2007, 02:50:35 pm
by biggsy
3 Replies
6272 Views
Last post February 08, 2008, 01:39:16 am
by rtyug
5 Replies
8265 Views
Last post September 26, 2008, 09:23:21 pm
by SMFHacks
4 Replies
7371 Views
Last post January 11, 2008, 02:15:38 pm
by rtyug
1 Replies
5319 Views
Last post February 07, 2008, 09:59:50 pm
by rtyug

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal