Find a string on a website

Hi I’m new to php and doing a code to find a string in a website of facebook app cityville.

this is my code

[php]<?php

$website = file_get_contents(‘http://fb-client-0.cityville.zynga.com’);
$findstring = stristr($website,“Bubuchacha”); // Example name to find.
$name= substr($findstring, 0, 10); // 10 character when I find the string i want.
echo $name;
?>[/php]

The problem is sometimes I can find the string I want and sometime I can’t. And can’t find a string in a website if it is in iframe scr=* but I can see the string when I view source page.

Sponsor our Newsletter | Privacy Policy | Terms of Service