Търся програмист

eshk0

Registered
Здравейте, търся програмист който разбира добре от пхп срещу заплащане.

Трябват ми няколко файла за ъплоуд и трябва да се напишат

Ето един примерен файл:

Rapidshare.php

Код:
 <?
/*
Product: Qooy.com script

Notice: OpenSource should be OpenSource!
*/

  echo 'require \'includes/configs.inc.php\';
#!$php_path -q
';
  $file_id = $argv[1];
  require 'includes/db.inc.php';
  require 'includes/configs.inc.php';
  if ($argv[2])
  {
    $status = $argv[2];
  }
  else
  {
    $status = 0;
  }

    if (!($data = mysql_query ('' . 'SELECT name FROM file WHERE uid = \'' . $file_id . '\'')))
    {
      exit (mysql_error ());
    }

    $info = mysql_fetch_array ($data);
    if ($status == 0)
    {
      if (!(mysql_query ('' . 'INSERT INTO mirror (uid, hostid) VALUES (\'' . $file_id . '\', \'1\')')))
      {
        exit (mysql_error ());
      }
    }

    mysql_close ();
    $done = 0;
    $flag = 0;
    $file_loc = 'uploads/' . $info['name'];
    $filename = $info['name'];
    $url = 'http://rapidshare.com';
    $file = @file ($url);
    $count = count ($file);
    $i = '0';
    while ($i < $count)
    {
      if (strstr ($file[$i], 'rapidshare.com/cgi-bin/upload.cgi'))
      {
        $main = $file[$i];
        $flag = 1;
        break;
      }

      ++$i;
    }

    if ($flag == 1)
    {
      $parse = explode ('action="', $main);
      $parse1 = explode ('" ', $parse[1]);
      $posturl = $parse1[0];
      if ($rapid['account'] == 0)
      {
        $postcontent = array ();
        $postcontent['filecontent'] = '@' . $file_loc;
        $ch = curl_init ();
        curl_setopt ($ch, CURLOPT_URL, $posturl);
        curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 2);
        curl_setopt ($ch, CURLOPT_POST, 1);
        curl_setopt ($ch, CURLOPT_POSTFIELDS, $postcontent);
        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
        $result = curl_exec ($ch);
        curl_close ($ch);
        $dflag = 0;
        $file = explode ('
', $result);
        $count = count ($file);
        $i = '0';
        while ($i < $count)
        {
          if ((strstr ($file[$i], 'Download Link') AND strstr ($file[$i], 'rapidshare.com/files/')))
          {
            $main = $file[$i];
            $dflag = 1;
            break;
          }

          ++$i;
        }

        $done = 0;
        if ($dflag == 1)
        {
          $parse = explode ('http://', $main);
          $parse1 = explode ('.html', $parse[1]);
          $mirrorurl = 'http://' . $parse1[0] . '.html';
          $done = 1;
        }
      }
      else
      {
        if ($rapid['account'] == 1)
        {
          $postcontent = array ();
          $postcontent['filecontent'] = '@' . $file_loc;
          $postcontent['freeaccountid'] = $rapid['user'];
          $postcontent['password'] = $rapid['password'];
          $loginurl = 'https://ssl.rapidshare.com/cgi-bin/collectorszone.cgi';
          $logincontent = array ();
          $logincontent['username'] = $rapid['user'];
          $logincontent['password'] = $rapid['password'];
        }
        else
        {
          if ($rapid['account'] == 2)
          {
            $postcontent = array ();
            $postcontent['filecontent'] = '@' . $file_loc;
            $postcontent['login'] = $rapid['user'];
            $postcontent['password'] = $rapid['password'];
            $loginurl = 'https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi';
            $logincontent = array ();
            $logincontent['login'] = $rapid['user'];
            $logincontent['password'] = $rapid['password'];
          }
        }
      }

      if ($rapid['account'] != 0)
      {
        $ch = curl_init ();
        curl_setopt ($ch, CURLOPT_URL, $posturl);
        curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 2);
        curl_setopt ($ch, CURLOPT_POST, 1);
        curl_setopt ($ch, CURLOPT_POSTFIELDS, $postcontent);
        curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)');
        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
        $result = curl_exec ($ch);
        curl_close ($ch);
        $ch = curl_init ();
        curl_setopt ($ch, CURLOPT_URL, $loginurl);
        curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)');
        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt ($ch, CURLOPT_COOKIEFILE, 'cookies/');
        curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookies/');
        curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt ($ch, CURLOPT_POST, 1);
        curl_setopt ($ch, CURLOPT_POSTFIELDS, $logincontent);
        $result = curl_exec ($ch);
        curl_close ($ch);
        $regexp = '' . 'Adliste\\["([0-9]*)"\\]\\["filename"\\] = "' . $filename . '";';
        if (preg_match_all ('' . '/' . $regexp . '/siU', $result, &$matches))
        {
          $buff = $matches[1][0];
          $done = 1;
        }

        $mirrorurl = '' . 'http://rapidshare.com/files/' . $buff . '/' . $filename;
      }
    }

    require 'includes/db.inc.php';
    if ($done == 1)
    {
      $status = 3;
      if (!(mysql_query ('' . 'UPDATE mirror SET url=\'' . $mirrorurl . '\', status=\'' . $status . '\' WHERE uid = \'' . $file_id . '\' AND hostid = \'1\'')))
      {
        exit (mysql_error ());
      }
    }
    else
    {
      ++$status;
      if (!(mysql_query ('' . 'UPDATE mirror SET status=\'' . $status . '\' WHERE uid = \'' . $file_id . '\' AND hostid = \'1\'')))
      {
        exit (mysql_error ());
      }
    }

    mysql_close ();
?>

Интересуващите се на ЛС или на скайп ercan_cho
 

Back
Горе