Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 182
Total: 182

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

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

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

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal