Preg_match URGENT simple question!

Discussion in 'PHP' started by born2hack, Oct 16, 2008.

  1. #1
    I have a variable that I received from a curl session by logging into rapidshare. Its the source code of a premium account page. have a look:

    <td>Expiration date:</td><td style="padding-right:20px;"><b>Sat, 14. Mar 2009</b></td>
    
    <td>RapidPoints:</td><td align=right style="padding-right:20px;"><b>8007</b></td>
    
    <td>Used storage:</td><td align=right><b>5837 MB</b></td>
    Code (markup):
    There are 3 VARIABLE VALUES inside that code:
    Sat, 14. Mar 2009
    8007
    5837 MB

    They will be different depending upon the account I am logged into...
    I tried a preg_match function damn lotsa times but no use... any help?
     
    born2hack, Oct 16, 2008 IP
  2. blognol

    blognol Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try the below pattern
    /<b>.*<\/b>/ with preg_match_all() ....
     
    blognol, Oct 16, 2008 IP
  3. born2hack

    born2hack Banned

    Messages:
    294
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for the reply but i figured it out from php.net + another post on DP.

    here is a working demo of the script i made:
    http://74.52.151.2/~lmao/check.php?user=USERNAME&pass=PASSWORD

    And the output you get is:
    
    Hey there 3999517, you have got 8007 Rapid points...kool, you have uploaded 5837 MB data in 161 files...impressive. And , the account expires on Sat, 14. Mar 2009.
    
    Code (markup):
    not that good...maybe...my first curl script lol, gonna make lots of em.
     
    born2hack, Oct 17, 2008 IP