Jump to content

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?

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.