Jump to content

[SOLVED] GRAB TEXT FROM YAHOO ??


salman_ahad@yahoo.com

Recommended Posts

I am able to grab text with this code

 

<?php

$urlpage = 'http://xyz.com/';

$filetext = fopen("$urlpage", "r");

while (!feof($filetext))

{

$theline = fgetss($filetext, 2048);

echo "$theline<br>";

}

fclose($filetext);

 

?>

 

How do I grab some specific words, I don't need everything.

 

i don't doubt that it can be done, it's called screen-scraping .. however, i was just suggesting a more efficient (possibly legal) way of accessing Yahoo's data, via their API.

 

you could use preg_match()/preg_match_all(), or if you have an array full of words you want to match, you could use in_array() .. of course there's more involved that just that, but i'm not going to just write you a full script now, am i.

 

what is it you are trying to do exactly with the content you are grabbing, anyways?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.