Advertisement
plas71k

decoded file 2

Dec 5th, 2012
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.93 KB | None | 0 0
  1. <?php
  2. function zestoi_webcams_admin_ifriends()
  3. {
  4.     return array(
  5.         'name' => "Click Cash (iFriends)",
  6.         'link' => "http://www.clickcash.com/refer.dll?acct=fotobunny&SVC=CC&art=pID_8042",
  7.         'config' => array(
  8.             array(
  9.                 'photos_url_prefix',
  10.                 ''
  11.             ),
  12.             array(
  13.                 'profile_url',
  14.                 'http://clickcashv2.webpower.com/Refer.dll?ACCT={$affiliate}&svc=IF&art=XML&PromoID=&url=http://fanclubs.ifriendsv2.net/membrg/ShowClub_v2_custom.dll?t=site/fanclubs/starpages/showclub/Main&pClub={$performerid}'
  15.             ),
  16.             array(
  17.                 'freechat_url',
  18.                 'http://clickcashv2.webpower.com/Refer.dll?ACCT={$affiliate}&svc=IF&art=XML&PromoID=&url=http://fanclubs.ifriendsv2.net/membrg/ShowClub_v2_custom.dll?t=site/fanclubs/starpages/showclub/Main&pClub={$performerid}'
  19.             ),
  20.             array(
  21.                 'max_models',
  22.                 '1000',
  23.                 'The maximum number of models to process each time'
  24.             )
  25.         )
  26.     );
  27. }
  28. function zestoi_webcams_cron_ifriends($config, $mode = 'full')
  29. {
  30.     $request['full'] = 'http://www.ifriendsv2.net/membrg2/LiveHosts.dll?t=site/navigation/livehosts/xml/LiveXML.xml&pContentType=XML&pf_VCHProfileImg_U_R=Y&pf_vchlive=y&acct=' . $config['affiliate'] . '&pLoopPageSize_allPappLiveHosts=' . $config['max_models'];
  31.     $request['lite'] = $request['full'];
  32.     $raw             = Zestoi::http_request($request[$mode]);
  33.     $response        = $raw['body'];
  34.     libxml_use_internal_errors(true);
  35.     $xml = simplexml_load_string($response);
  36.     if (!$xml) {
  37.         echo "Failed loading XML for iFriends<br>\n";
  38.         foreach (libxml_get_errors() as $error) {
  39.             echo $error->message . "<br>";
  40.         }
  41.         return;
  42.     }
  43.     $map           = array(
  44.         'name' => '$screenname',
  45.         'seoname' => '$screennamesimple',
  46.         'nickname' => '$screenname',
  47.         'performerid' => '$screennamesimple',
  48.         'category' => '$room',
  49.         'gender' => '$gender',
  50.         'about' => '$shortdescription<p>$longdescription<p>$aboutme',
  51.         'fantasies' => '$shortdescription',
  52.         'age' => '$age',
  53.         'eye_color' => '$eyecolor',
  54.         'hair_color' => '$haircolor',
  55.         'ethnicity' => '$ethnicity',
  56.         'height' => '$height',
  57.         'photo' => '$image',
  58.         'thumb' => '$imagesmall',
  59.         'breasts' => '$breasts',
  60.         'cup_size' => '$cupsize',
  61.         'waist' => '$waist',
  62.         'hips' => '$hips',
  63.         'status' => 'online'
  64.     );
  65.     $eyecolor_map  = array(
  66.         'black' => 'black',
  67.         'blue' => 'blue',
  68.         'brown' => 'brown',
  69.         'green' => 'green',
  70.         'hazel' => 'hazel',
  71.         'violet' => 'blue'
  72.     );
  73.     $haircolor_map = array(
  74.         'red' => 'red',
  75.         'auburn' => 'red',
  76.         'black' => 'black',
  77.         'blonde' => 'blonde',
  78.         'blond' => 'blonde',
  79.         'brown' => 'brown',
  80.         'brunette' => 'brown',
  81.         'orange' => 'orange'
  82.     );
  83.     $ethnicity_map = array(
  84.         'arabic' => 'middleeastern',
  85.         'asian' => 'asian',
  86.         'black' => 'ebony',
  87.         'hispanic' => 'hispanic',
  88.         'multiracial' => 'multiracial',
  89.         'white' => 'caucasian'
  90.     );
  91.     $category_map  = array(
  92.         'Dating' => 'dating',
  93.         'Friends & Fun' => 'making_friends',
  94.         'Gender-Benders (TS, TV, CD)' => 'transgender',
  95.         'Girl-Girl (Lesbians)' => 'lesbian',
  96.         'Guy-Girl (Couples)' => 'couples',
  97.         'Guys Home Alone (Gay)' => 'gay',
  98.         'Guys Home Alone (Straight)' => 'gay',
  99.         'Surrender To Fantasy' => 'fetish',
  100.         'Threesomes/Groups' => 'groups',
  101.         'Variations' => 'groups',
  102.         'Women Home Alone' => 'girls'
  103.     );
  104.     $models        = array();
  105.     foreach ($xml->item as $m) {
  106.         $model = array();
  107.         foreach (array(
  108.             'screenname',
  109.             'screennamesimple',
  110.             'room',
  111.             'roomnumber',
  112.             'shortdescription',
  113.             'longdescription',
  114.             'age',
  115.             'aboutme',
  116.             'eyecolor',
  117.             'haircolor',
  118.             'ethnicity',
  119.             'height',
  120.             'measurements',
  121.             'image',
  122.             'imagesmall',
  123.             'imagethumbnail',
  124.             'url'
  125.         ) as $a) {
  126.             $model[$a] = (string) $m->$a;
  127.         }
  128.         $model['eyecolor']  = zestoi_webcams_normalize($model['eyecolor'], $eyecolor_map);
  129.         $model['haircolor'] = zestoi_webcams_normalize($model['haircolor'], $haircolor_map);
  130.         $model['ethnicity'] = zestoi_webcams_normalize($model['ethnicity'], $ethnicity_map);
  131.         $model['room']      = zestoi_webcams_normalize($model['room'], $category_map, '');
  132.         if ($model['room'] == '')
  133.             continue;
  134.         if ($model['room'] == 'girls')
  135.             $model['gender'] = 'f';
  136.         elseif ($model['room'] == 'lesbian')
  137.             $model['gender'] = 'ff';
  138.         elseif ($model['room'] == 'transgender')
  139.             $model['gender'] = 'ts';
  140.         elseif ($model['room'] == 'couples')
  141.             $model['gender'] = 'mf';
  142.         elseif ($model['room'] == 'gay')
  143.             $model['gender'] = 'm';
  144.         elseif ($model['room'] == 'gay')
  145.             $model['groups'] = 'mf';
  146.         $model['height'] = strtolower($model['height']);
  147.         if (preg_match('/^(f|ff|mf|)$/', $model['gender'])) {
  148.             if ($model['height'] == 'veryshort')
  149.                 $model['height'] = 61;
  150.             elseif ($model['height'] == 'short')
  151.                 $model['height'] = 63;
  152.             elseif ($model['height'] == 'average')
  153.                 $model['height'] = 65;
  154.             elseif ($model['height'] == 'tall')
  155.                 $model['height'] = 66;
  156.             elseif ($model['height'] == 'verytall')
  157.                 $model['height'] = 68;
  158.             else
  159.                 $model['height'] = 65;
  160.         } else {
  161.             if ($model['height'] == 'veryshort')
  162.                 $model['height'] = 67;
  163.             elseif ($model['height'] == 'short')
  164.                 $model['height'] = 69;
  165.             elseif ($model['height'] == 'average')
  166.                 $model['height'] = 70;
  167.             elseif ($model['height'] == 'tall')
  168.                 $model['height'] = 71;
  169.             elseif ($model['height'] == 'verytall')
  170.                 $model['height'] = 73;
  171.             else
  172.                 $model['height'] = 65;
  173.         }
  174.         if (preg_match('!(\d\d)\s*([A-K]+)?\s*[\-/, _]+\s*(\d\d)\s*[\-/, _]+\s*(\d\d)!i', $model['measurements'], $cap) || preg_match('!^\s*(\d\d)\s*([A-K]+)?\s*$!i', $model['measurements'], $cap)) {
  175.             $breasts = $cap[1];
  176.             $cupsize = strtoupper($cap[2]);
  177.             $waist   = $cap[3];
  178.             $hips    = $cap[4];
  179.             if (!preg_match('/^(A|B|C|D|DD|DDD|HUGE)$/', $cupsize)) {
  180.                 if ($cupsize == 'E')
  181.                     $cupsize = 'DD';
  182.                 elseif ($cupsize == 'F')
  183.                     $cupsize = 'DDD';
  184.                 elseif (preg_match('/^(G|H|I|J|K|K\+|huge|massive)$/i', $cupsize))
  185.                     $cupsize = 'HUGE';
  186.                 else
  187.                     $cupsize = '';
  188.             }
  189.             if ($breasts > 55) {
  190.                 $breasts = (integer) ($breasts / 2.54 + 0.5);
  191.                 $waist   = (integer) ($waist / 2.54 + 0.5);
  192.                 $hips    = (integer) ($hips / 2.54 + 0.5);
  193.             }
  194.             $measurements = "$breasts$cupsize";
  195.             if ($waist != '' && $hips != '')
  196.                 $measurements .= "-$waist-$hips";
  197.             $model['breasts'] = $breasts;
  198.             $model['cupsize'] = $cupsize;
  199.             $model['waist']   = $waist;
  200.             $model['hips']    = $hips;
  201.         }
  202.         array_push($models, array(
  203.             'attribs' => $model,
  204.             'photos' => array()
  205.         ));
  206.     }
  207.     zestoi_webcams_update($config, $mode, $map, $models);
  208. }
  209. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement