wmoussalli Posted June 1, 2006 Share Posted June 1, 2006 I need php script that will enable me to scan a url for a specific word, then copy the next word after it to a vaiable...Imagine scanning this sites hompage for totalposts and then grabbing the following number and displaying it on my site...[b]Thanking you for your time....[/b]Wayne [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] Quote Link to comment https://forums.phpfreaks.com/topic/10942-scan-a-url-for-a-specific-word-on-page-need-a-pros-help/ Share on other sites More sharing options...
samshel Posted June 1, 2006 Share Posted June 1, 2006 [code] <?php$filename = "http://www.yourdomain.com/index.php";$contents = file_get_contents($filename);//read the urlpreg_match("`([0-9]+) User\(s\) are browsing this forum`",$contents,$var);//write a RE to parse the contents?>//$var[1] will contain the no of users[/code] Quote Link to comment https://forums.phpfreaks.com/topic/10942-scan-a-url-for-a-specific-word-on-page-need-a-pros-help/#findComment-40871 Share on other sites More sharing options...
wmoussalli Posted June 1, 2006 Author Share Posted June 1, 2006 Thank you very much am trying it now... Quote Link to comment https://forums.phpfreaks.com/topic/10942-scan-a-url-for-a-specific-word-on-page-need-a-pros-help/#findComment-40883 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.