Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Web Design & Development
Tag Cloud
access acer asus bios bsod crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop mac malware memory monitor motherboard network operating system printer problem ram registry router security slow software sound svchost.exe trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
PHP cant get contents of another page

Reply  
Thread Tools
Boylett's Avatar
Computer Specs
Member with 55 posts.
 
Join Date: Dec 2006
Experience: Intermediate
27-May-2007, 11:31 AM #1
PHP cant get contents of another page
Well I have this: http://boylett.hopto.org:81/teamspeak/index.php
It is a php script and it generates its contents by openning sockets and asking stuff on servers.

Well it loads fine. But I need to get its html contents and put them on another website

I have tried:
include("http://boylett.hopto.org:81/teamspeak/index.php");
echo file_get_contents("http://boylett.hopto.org:81/teamspeak/index.php");

But whenever I try, the webpage never loads. It just sits there.

How can I fix this
aewarnick's Avatar
Senior Member with 839 posts.
 
Join Date: Sep 2002
27-May-2007, 01:20 PM #2
I'm just guessing but the way you're trying to do this should not work for obvious security reasons. Let's say I was to try:
include("http://google.com");
I wouldn't expect it to work.

Try, if you can, not using an fully qualified path.
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
27-May-2007, 04:33 PM #3
include() works fine for this, it just sounds like your server has allow_url_fopen disabled. You can try using cURL instead.
aewarnick's Avatar
Senior Member with 839 posts.
 
Join Date: Sep 2002
27-May-2007, 06:34 PM #4
This would work?
include("http://google.com");
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
27-May-2007, 09:34 PM #5
Yes (unless allow_url_include is turned off in your PHP configuration.)

Last edited by brendandonhu; 27-May-2007 at 09:41 PM..
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:39 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.