Current location: Hot Scripts Forums » Programming Languages » PHP » Getting HTML on page


Getting HTML on page

Reply
  #1 (permalink)  
Old 01-02-07, 05:10 AM
Frbahan Frbahan is offline
Newbie Coder
 
Join Date: Sep 2006
Location: Denmark
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Getting HTML on page

Hi.

Since I'm a kid I don't wanna pay to have a homepage yet, so I'm using www.hotserv.dk.
Well, my problem is that I need to get som information from another page, who isn't on my site.
And since my host has disabled URL file-acces I can't get it.
This is the error when I try opening a page:
Quote:
Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /var/www/hotserv.dk/users/gameworld/PHPtester/show.php(23) : eval()'d code on line 3

Warning: fopen(http://www.gameworld.hotserv.dk/index.php) [function.fopen]: failed to open stream: no suitable wrapper could be found in /var/www/hotserv.dk/users/gameworld/PHPtester/show.php(23) : eval()'d code on line 3
Do you know any way I can get around this?
__________________
PHP was made by a danish professor.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-02-07, 06:21 AM
txt3rob txt3rob is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

<?php


$source 
file_get_contents'http://www.website.com' );

?>
aslong as you aint in save mode for php
__________________
N00b Coder! One of those guys who collects bits of code and puts them together and carnt really code for himself
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 01-02-07, 06:24 AM
Frbahan Frbahan is offline
Newbie Coder
 
Join Date: Sep 2006
Location: Denmark
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Still getting the same error.
Perhaps I could upload some .htaccess?
__________________
PHP was made by a danish professor.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 01-02-07, 06:39 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
Try placing this in htaccess

Code:
php_value allow_url_fopen 1
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 01-02-07, 06:48 AM
Frbahan Frbahan is offline
Newbie Coder
 
Join Date: Sep 2006
Location: Denmark
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
What if I can't get the htaccess?
It's made that way that you can't get the file..
__________________
PHP was made by a danish professor.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 01-02-07, 07:02 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
Hm, if it's not there... try to create a new one and place it in the main directory.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 01-02-07, 07:13 AM
Frbahan Frbahan is offline
Newbie Coder
 
Join Date: Sep 2006
Location: Denmark
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
The is already one in the main directory, but if I try getting it on my computer, I can't.
__________________
PHP was made by a danish professor.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 01-03-07, 05:54 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
try placing this code on top of your page:
PHP Code:

ini_set('allow_url_fopen'true); 

don't know if it's gonna work, but give it a try. If you only need the html of the page, you could use fsockopen to get it as well (example from php.net):
PHP Code:

$fp fsockopen("www.example.com"80$errno$errstr30);

if (!
$fp) {
   echo 
"$errstr ($errno)<br />\n";
} else {
   
$out "GET / HTTP/1.1\r\n";
   
$out .= "Host: www.example.com\r\n";
   
$out .= "Connection: Close\r\n\r\n";

   
fwrite($fp$out);
   while (!
feof($fp)) {
       echo 
fgets($fp128);
   }
   
fclose($fp);

UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 01-03-07, 07:58 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by Frbahan
Still getting the same error.
Perhaps I could upload some .htaccess?
You might try cURL, if it's on your server.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html tutoral thefrtman HTML/XHTML/XML 5 04-27-09 11:25 AM
Display PHP in HTML page using JS scott2500uk PHP 6 05-18-06 01:25 PM
To use include or embed HTML into my contact.php page dmaldon01 PHP 1 02-17-06 04:40 PM
Classified Ads skipper23 Perl 3 11-22-05 03:22 AM
Classified Ads skipper23 Perl 2 12-30-03 04:43 AM


All times are GMT -5. The time now is 09:54 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.