Can someone help me grab this code?

Discussion in 'Programming' started by Divvy, Jan 15, 2011.

  1. #1
    Hello guys,

    Can someone help me?
    I need to grab an website code to show my featured members at my website. Needs ti be exactly like the other website.

    What I need:
    Bar code at the top of the page where is saying "Put me here!" and showing 12 members photos.

    Where?
    You need to make an login to see: http://badoo.com/search/
    Please login with webmasterlair [ at ] gmail [ dot ] com and password friends

    Do you want to help me for free or want a fee for that?
    I can pay you via paypal, just let me know your price via pm...

    Thank you!
     
    Divvy, Jan 15, 2011 IP
  2. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    As Seller:
    100% - 1
    As Buyer:
    100% - 0
    #2
    Please someone? I will pay you for this job
     
    Divvy, Jan 16, 2011 IP
  3. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    As Seller:
    100% - 1
    As Buyer:
    100% - 1
    #3
    Cant login with those credentials supplied... pm me the correct details and I'll try and put something together for you.
     
    MyVodaFone, Jan 16, 2011 IP
  4. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    As Seller:
    100% - 1
    As Buyer:
    100% - 0
    #4
    Divvy, Jan 16, 2011 IP
  5. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    As Seller:
    100% - 1
    As Buyer:
    100% - 1
    #5
    This should get you started, I know its not what you wanted but it shows you how to login and extract the members id and avatar... you can style your own bar from the results...


    create a txt file called my_cookies.txt and place that in the same directory as this script...
    
    <?php
    
    $login_email = 'webmasterlair@gmail.com';
    $login_pass = 'qywyhohe';
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'http://badoo.com/signin/');
    curl_setopt($ch, CURLOPT_POSTFIELDS,'email='.urlencode($login_email).'&password='.urlencode($login_pass));
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_COOKIEJAR, "my_cookies.txt");
    curl_setopt($ch, CURLOPT_COOKIEFILE, "my_cookies.txt");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    
    curl_exec($ch);
    curl_setopt($ch, CURLOPT_POST, 0);
    curl_setopt($ch, CURLOPT_URL, "http://badoo.com/search/");
    
        $page = curl_exec($ch);
    
    
    // retrieve 
    preg_match_all('#<a href="http://badoo.com/([^<]+/?r=6)" title=""><img src="(//p71.badoo.com/[^<]+)" class="sp_cnvs_img" id="img([0-9])"></a>#i',$page, $items);
            print_r($items);   // take this line out and try the example below ie: remove // etc..
            
       
    //example
    
    //echo "<br />Example<br >";
    //echo "Avatar ",$items[0][0];
    //echo "<br />";
    //echo "ID ".$items[1][0];
    
    curl_close($ch);
    
    
    ?>
    
    PHP:
     
    MyVodaFone, Jan 16, 2011 IP
  6. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    As Seller:
    100% - 1
    As Buyer:
    100% - 0
    #6
    Ohhh damn, I think that I didn't explained well what I need.
    So much work that you had! :(

    I already have the code to show my members id and avatars...

    Here It is:
    {if count($aFeatured)}
    <div>
    {foreach from=$aFeatured item=aUser}
    	<div class="featitem">
    	{img user=$aUser suffix='_100' max_width=100 max_height=100}
    	</div>
    {/foreach}
    </div>
    </div>
    {/if}
    Code (markup):
    Where {img user=$aUser suffix='_100' max_width=100 max_height=100} is the line to show the avatar image.

    I only need to add the same mouse hover effects that badoo have and the same "Put me here" image... :/

    Sorry mate! Is more simple that you thought :)
     
    Divvy, Jan 16, 2011 IP
  7. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    As Seller:
    100% - 1
    As Buyer:
    100% - 0
    #7
    Please, someone?
     
    Divvy, Jan 16, 2011 IP
  8. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #8
    Apparently not so simple as what you posted is'nt PHP syntax...but template syntax (Smarty?)....which not everyone is familiar with (which is presumably why theirs no responses).
     
    danx10, Jan 18, 2011 IP
  9. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    As Seller:
    100% - 1
    As Buyer:
    100% - 1
    #9
    Still nobody replies... :( opps edit @Danx10 just did.

    Emm the code your looking for is the javascript, it looks like this:

    
    <script type="text/javascript">
    var Spotlight = new SpotlightClass({vars:{
            params: { cu_last_id:'0',culogin:'0199452822',sl_alert_pos:11,sl_again_popup:'http://badoo.com/spotlight/wizard-ws.phtml?spot_again=1&activation_place=2',check_cu_pos:0,cuid_shown_ws:'http://badoo.com/spotlight/user-was-shown-ws.phtml',lid:3,sid:87,s:'badoo.com',b:0,ts:1295365172,urlGetPrms:'r=6' },
    items: [{"login":"0185848683","id":"10002658","tooltip":"<a href=\"<mask>\">Jehanzeb<\/a> <span class=\"location\">Islamabad<\/span><p><\/p>","url":"\/\/p74.badoo.com\/142\/3\/4\/1\/185848683\/501958\/t1290167428\/501966_medium.jpg"},{"login":"0191146916","id":"10001674","tooltip":"<a href=\"<mask>\">Asad<\/a> <span class=\"location\">Islamabad<\/span><p>Best wishes<\/p>","url":"\/\/p74.badoo.com\/134\/2\/7\/8\/191146916\/18845\/t1292590957\/19066_medium.jpg"},{"login":"0168308847","id":"9999886","tooltip":"<a href=\"<mask>\">Naeem<\/a> <span class=\"location\">Islamabad<\/span><p><\/p>","url":"\/\/p74.badoo.com\/160\/2\/9\/3\/168308847\/677246\/t1286443071\/677255_medium.jpg"},{"login":"azirbashirjohn","id":"9999131","tooltip":"<a href=\"<mask>\">Azir Bashir<\/a> <span class=\"location\">Karachi<\/span><p>Hiiiiiiiiiiiiiii<\/p>","url":"\/\/p74.badoo.com\/244\/3\/9\/0\/176305924\/896950\/t1285990059\/910150_medium.jpg"},{"login":"0193823318","id":"9998975","tooltip":"<a href=\"<mask>\">Abdullah<\/a> <span class=\"location\">Karachi<\/span><p><\/p>","url":"\/\/p74.badoo.com\/211\/6\/6\/4\/193823318\/31157\/t1293531636\/31165_medium.jpg"},{"login":"0163629113","id":"9998775","tooltip":"<a href=\"<mask>\">Kashif<\/a> <span class=\"location\">Karachi<\/span><p>Wanna meet someone<br \/> special.<\/p>","url":"\/\/p74.badoo.com\/202\/9\/0\/0\/163629113\/437516\/t1286014147\/438940_medium.jpg"},{"login":"0193661447","id":"9998476","tooltip":"<a href=\"<mask>\">Sohail Rana<\/a> <span class=\"location\">Lahore<\/span><p>seeking woman 4 long<br \/> relation ship<\/p>","url":"\/\/p74.badoo.com\/225\/5\/1\/8\/193661447\/21096\/t1293501965\/21117_medium.jpg"},{"login":"0171411954","id":"9997670","tooltip":"<a href=\"<mask>\">Maqsood<\/a> <span class=\"location\">Lahore<\/span><p><\/p>","url":"\/\/p74.badoo.com\/235\/3\/6\/4\/171411954\/413596\/t1281277246\/449017_medium.jpg"},{"login":"0180652616","id":"9996505","tooltip":"<a href=\"<mask>\">Farukh<\/a> <span class=\"location\">Islamabad<\/span><p>Best wishes for all<\/p>","url":"\/\/p74.badoo.com\/116\/4\/4\/9\/180652616\/325146\/t1286488146\/326907_medium.jpg"},{"login":"0182864393","id":"9996279","tooltip":"<a href=\"<mask>\">Aftab<\/a> <span class=\"location\">Islamabad<\/span><p><\/p>","url":"\/\/p74.badoo.com\/236\/4\/0\/8\/182864393\/638039\/t1286539547\/639987_medium.jpg"},{"login":"0192974107","id":"9996112","tooltip":"<a href=\"<mask>\">Sunny<\/a> <span class=\"location\">Lahore<\/span><p><\/p>","url":"\/\/p74.badoo.com\/215\/0\/0\/1\/192974107\/755775\/t1295343418\/755788_medium.jpg"},{"login":"0183846723","id":"9995987","tooltip":"<a href=\"<mask>\">Bashir<\/a> <span class=\"location\">Karachi<\/span><p>Loving caring and would<br \/> like friends of same natur<\/p>","url":"\/\/p74.badoo.com\/195\/4\/0\/2\/183846723\/712627\/t1290711450\/747805_medium.jpg"},{"login":"0155606755","id":"9995918","tooltip":"<a href=\"<mask>\">Golden<\/a> <span class=\"location\">Lahore<\/span><p>nthng<\/p>","url":"\/\/p74.badoo.com\/158\/6\/8\/3\/155606755\/808904\/t1286302210\/912169_medium.jpg"},{"login":"0156506336","id":"9995895","tooltip":"<a href=\"<mask>\">Adi<\/a> <span class=\"location\">Karachi<\/span><p><\/p>","url":"\/\/p74.badoo.com\/245\/2\/4\/9\/156506336\/262584\/t1286048363\/262600_medium.jpg"},{"login":"0179556211","id":"9995097","tooltip":"<a href=\"<mask>\">AadiL<\/a> <span class=\"location\">Lahore<\/span><p>:) catch me, if u can ;)<\/p>","url":"\/\/p74.badoo.com\/161\/4\/2\/3\/179556211\/464526\/t1286491768\/464531_medium.jpg"}]
    }
    });
    </script>
    
    Code (markup):
    Of course you need to edit this by putting variables in instead of id's, names and images etc...

    The classes are located here http://images.badoo.com/2570/-/-/css/page.contacts_new_search.css to download or or use this code in your header
    
    <link rel="stylesheet" href="http://images.badoo.com/2570/-/-/css/page.contacts_new_search.css" type="text/css" media="screen,projection,print">
    
    Code (markup):
    For me anyway, it would take a bit of trail and error to get this right for you... ie: you will probable have to supply someone a copy of the script or at least ftp access...

    ... to place javascript within your template use the {literal}code{/literal} tags ( I think ? )
     
    MyVodaFone, Jan 18, 2011 IP
  10. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    As Seller:
    100% - 1
    As Buyer:
    100% - 0
    #10
    Ohhh sorry...

    This is the *class.php code:
    <?php
    
    defined('PHPWOLF') or exit('NO DICE!');
    
    
    class Ttirainbow_Component_Block_Featmembers2 extends Phpfox_Component
    {
    
    	public function process()
    	{
    
    		$dbase = Phpfox::getLib('database');
    			
    		$aRows = $dbase->select(Phpfox::getUserField() . ', uf.ordering, u.birthday, u.country_iso, u.status')
    			->from(Phpfox::getT('user'), 'u')
    			->join(Phpfox::getT('user_featured'), 'uf','uf.user_id = u.user_id')			
    			->limit(7)			
    			->order('RAND()')
    			->execute('getRows');	
    		
    		$this->template()->assign(array(
    				'aFeatured' => $aRows
    			)
    		);
    		
    		return 'block';		
    	}
    	
    }
    
    ?>
    Code (markup):
    And this is the *html.php code:
    <?php 
     
    defined('PHPWOLF') or exit('NO DICE!'); 
    
    ?>
    
    {if count($aFeatured)}
    <div>
    {foreach from=$aFeatured item=aUser}
    	<div class="featitem">
    	{img user=$aUser suffix='_100' max_width=100 max_height=100}
    
    	<div class="featinfo">
    		{$aUser|user|shorten:20}<br/>
    		Age: {$aUser.birthday|age} <br/>
    	</div>
    	</div>
    {/foreach}
    </div>
    </div>
    {/if}
    Code (markup):
    I only need to show the member pic, so I deleted the lines:
    <div class="featinfo">
    		{$aUser|user|shorten:20}<br/>
    		Age: {$aUser.birthday|age} <br/>
    	</div>
    Code (markup):
    But It seems that the code is messing my webpage, mostly the members IDs. Any ideas of what could be?

    About my request, like you can see, I already have the code to show my members pics, the only thing that I need is:
    1- Same effect like badoo have when we pass with the mouse hover the pic (zoom)
    2- Same blue image that is saying "Put me here!"... notice that the image is above (hover) the members pics...

    Thats all! :)
    Sorry for my poor english... hope that you understood now.
    Can someone help me? Thank you
     
    Divvy, Jan 18, 2011 IP
  11. gapz101

    gapz101 Well-Known Member

    Messages:
    524
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    150
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #11
    Hi there, let me try this:

    controller:
    
    removed
    
    PHP:

    template:
    
    removed
    
    PHP:
     
    Last edited: Jan 18, 2011
    gapz101, Jan 18, 2011 IP
  12. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    As Seller:
    100% - 1
    As Buyer:
    100% - 0
    #12
    Thank you gapz101, but unfortunately, didn't work. ;(
     
    Divvy, Jan 18, 2011 IP
  13. militarysmurf

    militarysmurf Member

    Messages:
    93
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    40
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #13
    If you're willing to pay for this I can make it work :)
     
    militarysmurf, Jan 18, 2011 IP
  14. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    As Seller:
    100% - 1
    As Buyer:
    100% - 1
    #14
    By classes I meant the style-sheet class/es ie: the hover effect
     
    MyVodaFone, Jan 19, 2011 IP
  15. gapz101

    gapz101 Well-Known Member

    Messages:
    524
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    150
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #15
    i fixed the code and finally got it working, url removed
     
    Last edited: Jan 19, 2011
    gapz101, Jan 19, 2011 IP
  16. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    As Seller:
    100% - 1
    As Buyer:
    100% - 0
    #16
    Nice work! Sent you an pm :)
     
    Divvy, Jan 19, 2011 IP