1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

need a php coder

Discussion in 'Hire a Freelancer' started by asdf221, Nov 3, 2008.

  1. asdf221

    asdf221 Registered Member

    Joined:
    Mar 18, 2008
    Messages:
    59
    Likes Received:
    3
    I need a simple script i need made that allow me to login to a site
     
  2. red2004

    red2004 Junior Member

    Joined:
    Aug 17, 2007
    Messages:
    129
    Likes Received:
    28
    which site?? please make it more specific!~
     
  3. asdf221

    asdf221 Registered Member

    Joined:
    Mar 18, 2008
    Messages:
    59
    Likes Received:
    3
    need it to login to nba.com

    ................
     
  4. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    PHP:
    <?php
    $c 
    curl_init();

    curl_setopt($cCURLOPT_URL'https://audience.nba.com/services/msib/flow/login?_flowExecutionKey=e1s2');//connect
    curl_setopt($cCURLOPT_HEADER1);
    curl_setopt($cCURLOPT_VERBOSE1);
    curl_setopt($cCURLOPT_RETURNTRANSFER,1);
    curl_setopt($cCURLOPT_USERAGENT'Mozilla/5.0 (X11; U; Linux i686;pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3');
    curl_setopt($cCURLOPT_ENCODING'gzip');
    curl_setopt($cCURLOPT_ENCODING'deflate');
    curl_setopt($cCURLOPT_ENCODING'');
    curl_setopt($cCURLOPT_COOKIEJAR'cookies.txt');
    curl_setopt($cCURLOPT_COOKIEFILE'cookies.txt');
    curl_setopt($cCURLOPT_POST1);
    curl_setopt($cCURLOPT_POSTFIELDS'loginId=mylogin&password=mypasswd&_eventId_submit.x=37&_eventId_submit.y=9'); //data to send
    curl_setopt($cCURLOPT_FOLLOWLOCATION1);
    $page curl_exec($c);
    ?>
    regards
     
  5. asdf221

    asdf221 Registered Member

    Joined:
    Mar 18, 2008
    Messages:
    59
    Likes Received:
    3
  6. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    PHP:
    <?php
    $b 
    curl_init();
    curl_setopt($bCURLOPT_URL'http://premium.nba.com/pr/leaguepass/app/tk/index.jhtml/gameId=0020800021');//connect to next site
    curl_setopt($bCURLOPT_HEADER1);
    curl_setopt($bCURLOPT_VERBOSE1);
    curl_setopt($bCURLOPT_RETURNTRANSFER,1);
    curl_setopt($bCURLOPT_USERAGENT'Mozilla/5.0 (X11; U; Linux i686;pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3');
    curl_setopt($bCURLOPT_ENCODING'gzip');
    curl_setopt($bCURLOPT_ENCODING'deflate');
    curl_setopt($bCURLOPT_ENCODING'');
    //curl_setopt($b, CURLOPT_COOKIEJAR, 'cookies.txt');
    curl_setopt($bCURLOPT_COOKIEFILE'cookies.txt');//use cookie from first curl
    curl_setopt($bCURLOPT_FOLLOWLOCATION1);
    $page1 curl_exec($b);
    ?>
    regards

    ps. if my post was useful click THANKS :)
     
    Last edited: Nov 3, 2008
  7. asdf221

    asdf221 Registered Member

    Joined:
    Mar 18, 2008
    Messages:
    59
    Likes Received:
    3
    It does not work, its not getting all the cookies that it needs to open webpages

    If anyone can figure it out I will pay them
     
  8. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    send me PM with login detalis - i will see whats wrong
     
  9. asdf221

    asdf221 Registered Member

    Joined:
    Mar 18, 2008
    Messages:
    59
    Likes Received:
    3
    sent

    thanks :)
    .................
     
  10. asdf221

    asdf221 Registered Member

    Joined:
    Mar 18, 2008
    Messages:
    59
    Likes Received:
    3
    were you able to get it working?
    i sent you a msg with the detail


    also if anyone else can get it working let me know how much you would charge
     
  11. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
  12. asdf221

    asdf221 Registered Member

    Joined:
    Mar 18, 2008
    Messages:
    59
    Likes Received:
    3

    Its a hidden link

    I just need a script that will echo the source out of that link, then I can take over from there
     
  13. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    If you need help be more specific!
    Nobody is clairvoyant here...
    Tell me where exactly is this link or what exactly you expect from script

    regards
     
  14. asdf221

    asdf221 Registered Member

    Joined:
    Mar 18, 2008
    Messages:
    59
    Likes Received:
    3
  15. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    Code:
    HTTP Status 404 - /pr/leaguepass/app/tk/index.jhtml/gameId=0020800021
    
    type Status report
    
    message /pr/leaguepass/app/tk/index.jhtml/gameId=0020800021
    
    description The requested resource (/pr/leaguepass/app/tk/index.jhtml/gameId=0020800021) is not available.
    Apache Tomcat/5.5.26
    This is always in http://premium.nba.com/pr/leaguepass/app/tk/index.jhtml/gameId=0020800021 (When i'm using to login browser and php script to)
    Do you have the same when you are trying open this site in browser?
     
  16. adserverexpert

    adserverexpert Registered Member

    Joined:
    Oct 30, 2008
    Messages:
    51
    Likes Received:
    1
    hi

    we are group of web programming consultant. we are expert in php. contact me through pm.
     
  17. asdf221

    asdf221 Registered Member

    Joined:
    Mar 18, 2008
    Messages:
    59
    Likes Received:
    3
    that link is dead now

    try this link

    http://premium.nba.com/pr/leaguepass/app/tk/index.jhtml?gameId=0020800020

    thanks :)
     
  18. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    still dead :) but here is code
    PHP:
    <?


    $c curl_init();
    curl_setopt($cCURLOPT_URL'https://audience.nba.com/services/msib/flow/lpb-authorizer');//connect
    curl_setopt($cCURLOPT_SSL_VERIFYPEERFALSE);
    curl_setopt($cCURLOPT_HEADER1);
    curl_setopt($cCURLOPT_RETURNTRANSFER,1);
    curl_setopt($cCURLOPT_USERAGENT'Mozilla/5.0 (X11; U; Linux i686;pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3');
    curl_setopt($cCURLOPT_ENCODING'gzip');
    curl_setopt($cCURLOPT_ENCODING'deflate');
    curl_setopt($cCURLOPT_ENCODING'');
    curl_setopt($cCURLOPT_REFERER"https://audience.nba.com/services/msib/flow/billingServiceAuthorization?serviceCode=billing&privileges=lpb^lpbnb&url=http%3A%2F%2Fpremium.nba.com%2Fpr%2Fleaguepass%2Fapp%2Ftk%2Findex.jhtml%2FgameId%3D0020800019");
    curl_setopt($cCURLOPT_COOKIEJAR'cookies.txt');
    curl_setopt($cCURLOPT_COOKIEFILE'cookies.txt');
    curl_setopt($cCURLOPT_POST1);
    curl_setopt($cCURLOPT_POSTFIELDS'loginId=HERE PUT YOUR LOGIN&password=HERE PUT YOUR PASSWD&privileges=lpb%5Elpbnb&serviceCode=billing&url=HERE PUT PAGE'); //data to send
    curl_setopt($cCURLOPT_FOLLOWLOCATION1);
    $page curl_exec($c);

    $d curl_init();
    curl_setopt($dCURLOPT_URL'http://premium.nba.com/pr/leaguepass/app/tk/index.jhtml/gameId=0020800020');//THIS IS PAGE
    curl_setopt($dCURLOPT_HEADER1);
    curl_setopt($dCURLOPT_VERBOSE1);
    curl_setopt($dCURLOPT_RETURNTRANSFER,1);
    curl_setopt($dCURLOPT_USERAGENT'Mozilla/5.0 (X11; U; Linux i686;pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3');
    curl_setopt($dCURLOPT_ENCODING'gzip');
    curl_setopt($dCURLOPT_ENCODING'deflate');
    curl_setopt($dCURLOPT_ENCODING'');
    //curl_setopt($d, CURLOPT_COOKIEJAR, 'cookies.txt');
    curl_setopt($dCURLOPT_COOKIEFILE'cookies.txt');//use cookie from first curl
    curl_setopt($dCURLOPT_FOLLOWLOCATION1);
    $page2 curl_exec($d);


    echo 
    $page2;
    ?>
    regards
     
  19. asdf221

    asdf221 Registered Member

    Joined:
    Mar 18, 2008
    Messages:
    59
    Likes Received:
    3
    thanks!

    its outputting the xml data along with some other data too

    when i try this url

    http://premium.nba.com/pr/leaguepass/app/tk/index.jhtml?gameId=0020800048


    what i am trying to do is parse out the first rtmp link

    rtmp%3A%2F%2Fnba-lp-flod.cdn.turner.com%2Fondemand%2Fio%2Fnba%2Fbig%2Fleaguepass%2F2008%2F11%2F04%2F0020800048_800.flv%3Fauth%3DdaEcvc5dZbtcFcddtdJa7a2bucHcha6bSbj-bjflc7-vga-XMQXZ%26aifp%3D1234%26slist%3Dio%2Fnba%2Fbig%2Fleaguepass%2F2008%2F11%2F04%2F0020800048_800


    thanks :)