I don't retrieve full HTML page using file_get_contents

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
stv
Forum Newbie
Posts: 6
Joined: Thu Oct 19, 2006 8:29 am

I don't retrieve full HTML page using file_get_contents

Post by stv »

Hi People,

an absolute beginner here. I' trying to get an html page using the function:

Code: Select all

file_get_contents($requestURL)
I'm a flash programmer and I have to get Google Images by a certain query value, etc

but file_get_contents is sending my flash file only a part of the result page; almost like 20 rows...

does anybody know why?

there is another way to get an html page (as a string) in php?

thanks a lot.
stv
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: I don't retrieve full HTML page using file_get_contents

Post by s.dot »

I'm not sure why that wouldn't get the entire contents of the page. I'm thinking it may be a timeout issue if the page is slow loading? Or perhaps other PHP code is truncating the string somewhere. Could you post more code?

My second thoughts would be using fsockopen() along with some file functions.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply