Results 1 to 3 of 3

Thread: Get Data From Page cURL

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    15

    Get Data From Page cURL

    Say i want to grab the logged in user on this site, i cant grab what i want without grabing the whole page.

    PHP Code:
    <?
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'http://www.vbforums.com');
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $data = curl_exec($ch);
    echo $data;
    curl_close($ch);
    ?>

  2. #2

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    15

    Re: Get Data From Page cURL

    Please Help needing it today.

  3. #3
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Get Data From Page cURL

    you can use preg_match() and make a regular expression to find something similar to this:
    Code:
    <strong>Welcome, <a href="member.php?u=45163">kows</a>.</strong><br />

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width