Results 1 to 5 of 5

Thread: [RESOLVED] Help using strpos to find a text data in string from remote html

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Resolved [RESOLVED] Help using strpos to find a text data in string from remote html

    Hi all i am trying to use strpos( ..) function to find some data in string from a remote page using curl. My curl is working well since i used print $result; and the html page got loaded with in the script . But the scrip never be able to find the "This profile is set to private. " with the following html ( in remote page):

    Code:
     <span id="ctl00_Main_ctl00_ctrlMessage">This profile is set to private. This user must add you as a friend to see his/her profile.</span>
    I be happy if some one tell me what i am doing wrong.Thanks

    PHP Code:

    curl_setopt
    ($curlCURLOPT_URL'http://www.myspace.com/' $_POST['url']);
            
    curl_setopt($curlCURLOPT_POST0);
            
    $result curl_exec($curl);
            
    $headers curl_getinfo($curl);
        
            if (
    strpos($result'This profile is set to private.'))
                    {
                          echo 
    "found";
                       
                    }
                    else
                    {
                         echo 
    "Not found";
                    } 
    part html:



    HTML Code:
     <span id="ctl00_Main_ctl00_ctrlMessage">This profile is set to private. This user must add you as a friend to see his/her profile.</span>
    
    Last edited by tony007; Jun 17th, 2008 at 12:26 AM.

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