Uploading Form From Sea 8.1 Mod Error!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Uploading Form From Sea 8.1 Mod Error!

    PHP Code:
    case 'import2':
    set_time_limit(99999);

    if(
    $_POST['url'])
    {
    $b file('browser.dat');
    $s sizeof($b)-1;

    $ot trim($_POST['ot']);
    $do trim($_POST['do']);
    $dir trim($_POST['topath']);
    $url trim($_POST['url']);
    $referer trim($_POST['referer']);
    $dir=''.$_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF']).'/'.$topath;
    if(
    strlen($ot)>&& $ot[0]=='0'){
    $null substr_count($ot,'0');
    for(
    $i=0$i<$null; ++$i){
    $temp.= '0';
    }
    }


    $ref $get =array();

    for(
    $i=$ot$i<=$do; ++$i)
    {

    if(
    $temp!==false){
    $num $i/10;
    if(
    $num==|| $num==10 || $num==100 || $num==1000 || $num==10000 || $num==100000 || $num==1000000){
    $temp substr($temp,0,-1);
    }
    }


    if(
    $temp!==false && $i!=$ot){
    $get[].= str_replace('$',$temp.$i,$url);
    $ref[].= str_replace('$',$temp.$i,$referer);
    }
    else{
    $get[].= str_replace('$',$i,$url);
    $ref[].= str_replace('$',$i,$referer);
    }

    }


    mkdir($dir,0777);
    chmod($dir,0777);

    for(
    $i=0$i<=sizeof($get); $i++)
    {
    ini_set('user_agent',trim($b[rand(0,$s)])."\r\nReferer: $ref[$i]\r\nAccept: */*\r\nAccept-Charset: utf-8\r\nAccept-language: ru-RU");
    if(
    copy($get[$i],$dir.basename($get[$i]))){++$g;}
    }

    chmod($dir,0755);

    print 
    'Copied '.$g.' File(S)'
    }
    else
    {
    $dirs mysql_query("SELECT `path` FROM `files` WHERE `size` = '0';");
    print 
    '<form action="'.$_SERVER['PHP_SELF'].'?action=import2" method="post">
    <div>
    Save:<br>
    <select class="buttom" size="1" width="70" name="topath"><option value="'
    .$setup['path'].'/">./</option>';
    while(
    $item mysql_fetch_array($dirs))
    {

    $name str_replace($setup['path'].'/','',$item['path']);
    $path explode('/',$name);
    $option '';
    unset(
    $path[sizeof($path)-1]);
    foreach(
    $path as $value)
    {
    if(
    strpos($value '!') !== false$name trans($value); else $name $value;
    $option $option.$name.'/';
    }
    echo 
    '<option value="'.$item['path'].'">'.$option.'</option>';
    }

    echo 
    '</select><br>
    URL<br/>
    <input type="text" name="url" value="http://"/><br/>
    Referer<br/>
    <input type="text" name="referer" value="http://"/><br/>
    Start with<br/>
    <input type="text" name="ot" value="1"/><br/>
    Finish<br/>
    <input type="text" name="do" value="100"/><br/>
    <input type="submit" value="Submit"/>
    </div>
    </form>FAQ(????)<br/>----------<br/>
    For example, we write:<br/>
    Where Copy - dir/<br/>
    URL - http://www.example.com/$.gif<br/>
    Referer - http://www.example.com/$.gif<br/>
    Start with- 001 (do not start with all zeros)<br/>
    Finish - 100<br/>----------'
    ;
    }
    if(!empty(
    $faq)) echo "Where to copy - a folder on your host, where the files will be copied, the name \u003cbr/\u003e about this script, if this folder does not exist, it will be created<br/>
    URL - address of the resource from which we download content, the $ symbol to be replaced <br/>Figures / LETTERS<br/>
    Referer - referrer, the $ symbol will be replaced by the number / letter<br/>
    In the parameters of 'Start with' and 'Finish' is entered Figures / letters from which will be launched <br/>count and who finished respectively<br/>
    <br/>

    <br/>
    In this case somebody.com will be copied to your host files dir <br/>http://www.example.com/001.gif, http://www.example.com/002.gif ... <br/>http://www.example.com/100.gif<br/>
    <br/>
    Taking the example script Gemoroya.of site wapinet.ru<br/>"
    ;
    break; 
    The Code Is From Sea Mod 8.1 apanel.php .In this we have a problem the uploaded files are copied to root directory not the preferred path .Please any one help me to correct this problem.I want upload some files to the defined directory . Please help me . Thanks in Advance.

    #2
    Any php experts please help me to fix the problem?

    Comment


      #3
      . script have no error. if any functions are not working then contact with hosting owners.

      Comment

      Working...
      X