Jump to content

Remote Web Page Information


Mr-Moo

Recommended Posts

Hello everyone,

 

I have been toying with php for roughly 1 year now, so I am familiar with what it looks like and how it acts, but am totally clueless on how to code. I have read a book written by Addison Wesley, but I am still dumb as a box of rocks.

 

Here is what I am looking to do. I am trying to create a script that can grab information from a 3rd party website. For example, say I wanted to copy the text

 

"Advertising Programs - Business Solutions - About Google"

 

Off of Google's homepage. I wanted my website to open Google and select that text and output it onto my site. So if Google where to edit that information, it would also edit on my site.

 

Anyone have any idea how to do this? I had a buddy who did that once with a Roster Rankings chart for IGN Gamespy Arena, but he ran off.

 

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/72378-remote-web-page-information/
Share on other sites

Thanks for the quick reply!

 

I tried to implement the command and I am running into an error.

 

Here is what I put -

<?
$content=file_get_contents("http://www.google.com",FALSE,NULL,0,20);
echo $content;
?>

 

And this is what it outputs -

Warning: file_get_contents() expects at most 2 parameters, 5 given in /local/home/test.php on line 2

 

Could you maybe provide some more information on why it is not working, or maybe how to be more specific on what it echos?

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.