Jump to content

Recommended Posts

hi I'm having trouble with this one what i want to do here is that i want to know if a webapge contains the specific string that i've inputted so i do this like this

function search_call($url,$search_criteria){
$size = 0;

$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// grab URL, and return output
$output = curl_exec($ch);

// close curl resource, and free up system resources
curl_close($ch);
echo $output;
if (eregi($search_criteria, $output)) {
    $size = 1;
}

 

the problem here is that sometimes it returns that the string is not found. but when i went to the actual site and use the ctrl+f i'll see that it actually contains the actual string.. anyone have better idea doing this?? thx

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.