Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function zestoi_webcams_admin_ifriends()
- {
- return array(
- 'name' => "Click Cash (iFriends)",
- 'link' => "http://www.clickcash.com/refer.dll?acct=fotobunny&SVC=CC&art=pID_8042",
- 'config' => array(
- array(
- 'photos_url_prefix',
- ''
- ),
- array(
- 'profile_url',
- '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}'
- ),
- array(
- 'freechat_url',
- '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}'
- ),
- array(
- 'max_models',
- '1000',
- 'The maximum number of models to process each time'
- )
- )
- );
- }
- function zestoi_webcams_cron_ifriends($config, $mode = 'full')
- {
- $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'];
- $request['lite'] = $request['full'];
- $raw = Zestoi::http_request($request[$mode]);
- $response = $raw['body'];
- libxml_use_internal_errors(true);
- $xml = simplexml_load_string($response);
- if (!$xml) {
- echo "Failed loading XML for iFriends<br>\n";
- foreach (libxml_get_errors() as $error) {
- echo $error->message . "<br>";
- }
- return;
- }
- $map = array(
- 'name' => '$screenname',
- 'seoname' => '$screennamesimple',
- 'nickname' => '$screenname',
- 'performerid' => '$screennamesimple',
- 'category' => '$room',
- 'gender' => '$gender',
- 'about' => '$shortdescription<p>$longdescription<p>$aboutme',
- 'fantasies' => '$shortdescription',
- 'age' => '$age',
- 'eye_color' => '$eyecolor',
- 'hair_color' => '$haircolor',
- 'ethnicity' => '$ethnicity',
- 'height' => '$height',
- 'photo' => '$image',
- 'thumb' => '$imagesmall',
- 'breasts' => '$breasts',
- 'cup_size' => '$cupsize',
- 'waist' => '$waist',
- 'hips' => '$hips',
- 'status' => 'online'
- );
- $eyecolor_map = array(
- 'black' => 'black',
- 'blue' => 'blue',
- 'brown' => 'brown',
- 'green' => 'green',
- 'hazel' => 'hazel',
- 'violet' => 'blue'
- );
- $haircolor_map = array(
- 'red' => 'red',
- 'auburn' => 'red',
- 'black' => 'black',
- 'blonde' => 'blonde',
- 'blond' => 'blonde',
- 'brown' => 'brown',
- 'brunette' => 'brown',
- 'orange' => 'orange'
- );
- $ethnicity_map = array(
- 'arabic' => 'middleeastern',
- 'asian' => 'asian',
- 'black' => 'ebony',
- 'hispanic' => 'hispanic',
- 'multiracial' => 'multiracial',
- 'white' => 'caucasian'
- );
- $category_map = array(
- 'Dating' => 'dating',
- 'Friends & Fun' => 'making_friends',
- 'Gender-Benders (TS, TV, CD)' => 'transgender',
- 'Girl-Girl (Lesbians)' => 'lesbian',
- 'Guy-Girl (Couples)' => 'couples',
- 'Guys Home Alone (Gay)' => 'gay',
- 'Guys Home Alone (Straight)' => 'gay',
- 'Surrender To Fantasy' => 'fetish',
- 'Threesomes/Groups' => 'groups',
- 'Variations' => 'groups',
- 'Women Home Alone' => 'girls'
- );
- $models = array();
- foreach ($xml->item as $m) {
- $model = array();
- foreach (array(
- 'screenname',
- 'screennamesimple',
- 'room',
- 'roomnumber',
- 'shortdescription',
- 'longdescription',
- 'age',
- 'aboutme',
- 'eyecolor',
- 'haircolor',
- 'ethnicity',
- 'height',
- 'measurements',
- 'image',
- 'imagesmall',
- 'imagethumbnail',
- 'url'
- ) as $a) {
- $model[$a] = (string) $m->$a;
- }
- $model['eyecolor'] = zestoi_webcams_normalize($model['eyecolor'], $eyecolor_map);
- $model['haircolor'] = zestoi_webcams_normalize($model['haircolor'], $haircolor_map);
- $model['ethnicity'] = zestoi_webcams_normalize($model['ethnicity'], $ethnicity_map);
- $model['room'] = zestoi_webcams_normalize($model['room'], $category_map, '');
- if ($model['room'] == '')
- continue;
- if ($model['room'] == 'girls')
- $model['gender'] = 'f';
- elseif ($model['room'] == 'lesbian')
- $model['gender'] = 'ff';
- elseif ($model['room'] == 'transgender')
- $model['gender'] = 'ts';
- elseif ($model['room'] == 'couples')
- $model['gender'] = 'mf';
- elseif ($model['room'] == 'gay')
- $model['gender'] = 'm';
- elseif ($model['room'] == 'gay')
- $model['groups'] = 'mf';
- $model['height'] = strtolower($model['height']);
- if (preg_match('/^(f|ff|mf|)$/', $model['gender'])) {
- if ($model['height'] == 'veryshort')
- $model['height'] = 61;
- elseif ($model['height'] == 'short')
- $model['height'] = 63;
- elseif ($model['height'] == 'average')
- $model['height'] = 65;
- elseif ($model['height'] == 'tall')
- $model['height'] = 66;
- elseif ($model['height'] == 'verytall')
- $model['height'] = 68;
- else
- $model['height'] = 65;
- } else {
- if ($model['height'] == 'veryshort')
- $model['height'] = 67;
- elseif ($model['height'] == 'short')
- $model['height'] = 69;
- elseif ($model['height'] == 'average')
- $model['height'] = 70;
- elseif ($model['height'] == 'tall')
- $model['height'] = 71;
- elseif ($model['height'] == 'verytall')
- $model['height'] = 73;
- else
- $model['height'] = 65;
- }
- 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)) {
- $breasts = $cap[1];
- $cupsize = strtoupper($cap[2]);
- $waist = $cap[3];
- $hips = $cap[4];
- if (!preg_match('/^(A|B|C|D|DD|DDD|HUGE)$/', $cupsize)) {
- if ($cupsize == 'E')
- $cupsize = 'DD';
- elseif ($cupsize == 'F')
- $cupsize = 'DDD';
- elseif (preg_match('/^(G|H|I|J|K|K\+|huge|massive)$/i', $cupsize))
- $cupsize = 'HUGE';
- else
- $cupsize = '';
- }
- if ($breasts > 55) {
- $breasts = (integer) ($breasts / 2.54 + 0.5);
- $waist = (integer) ($waist / 2.54 + 0.5);
- $hips = (integer) ($hips / 2.54 + 0.5);
- }
- $measurements = "$breasts$cupsize";
- if ($waist != '' && $hips != '')
- $measurements .= "-$waist-$hips";
- $model['breasts'] = $breasts;
- $model['cupsize'] = $cupsize;
- $model['waist'] = $waist;
- $model['hips'] = $hips;
- }
- array_push($models, array(
- 'attribs' => $model,
- 'photos' => array()
- ));
- }
- zestoi_webcams_update($config, $mode, $map, $models);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement