1

Topic: problem include extern.php

in test.php

<?php include('http://forexsb.com/forum/extern.php'); ?> 

when i run it show error

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/izpirit/domains/asiansusu.com/public_html/test.php on line 1

Warning: include(http://forexsb.com/forum/extern.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/izpirit/domains/asiansusu.com/public_html/test.php on line 1

Warning: include() [function.include]: Failed opening 'http://forexsb.com/forum/extern.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/izpirit/domains/asiansusu.com/public_html/test.php on line 1

how to fix it or how to make recent post on index step by step

thank you

Re: problem include extern.php

Try

echo file_get_contents('http://forexsb.com/forum/extern.php');

3

Re: problem include extern.php

Garciat wrote:

Try

echo file_get_contents('http://forexsb.com/forum/extern.php');

                        [url="garciat.org/">Garciat - Die hard

Some info about me

thx for u answer but not work when i run test.php it show blank page

Re: problem include extern.php

Are you sure? Did you wrap the code with PHP tags?

5

Re: problem include extern.php

sure i use

<?php 
echo file_get_contents('http://forexsb.com/forum/extern.php'); 
?>

don't work

Re: problem include extern.php

What error do you get?

7

Re: problem include extern.php

Garciat wrote:

What error do you get?

I try again it working ^^"
Thank You Very Much big_smile

Re: problem include extern.php

<?php
echo file_get_contents('http://hakimct.freehostia.com/forum/extern.php');
?>

and i got this error someone pls help neutral

Warning: file_get_contents(http://hakimct.freehostia.com/forum/extern.php) [function.file-get-contents]: failed to open stream: Permission denied in /home/www/hakimct.freehostia.com/index.php on line 129

if mONey is lOSt nOThINg is lOSt,
if cHArACtER is lOSt sOMeTHiNG is lOSt,
bUT,
if rELiGIon and eDUcATiON aRE lOSt eVErYThINg is lOSt.

9 (edited by Programming-Designs 2009-02-15 20:57)

Re: problem include extern.php

FaRe-Ed wrote:

<?php
echo file_get_contents('http://hakimct.freehostia.com/forum/extern.php');
?>

and i got this error someone pls help neutral

Warning: file_get_contents(http://hakimct.freehostia.com/forum/extern.php) [function.file-get-contents]: failed to open stream: Permission denied in /home/www/hakimct.freehostia.com/index.php on line 129

It's possible that the function has been disallowed by your server provider or maybe something to do with file permissions on extern.php

Programming Designs - Tech, programming, and web design blog
PD Forums - Using the latest and greatest PunBB 1.3 =)

Re: problem include extern.php

I think if my server disallowed it should have not allow me to run a forum. Maybe i need extra code to call extern.php from another pages? Someone pls help. I really need this. big_smile

if mONey is lOSt nOThINg is lOSt,
if cHArACtER is lOSt sOMeTHiNG is lOSt,
bUT,
if rELiGIon and eDUcATiON aRE lOSt eVErYThINg is lOSt.

Re: problem include extern.php

FaRe-Ed wrote:

I think if my server disallowed it should have not allow me to run a forum. Maybe i need extra code to call extern.php from another pages? Someone pls help. I really need this. big_smile

Use rss google gadget

Re: problem include extern.php

i did some search but that rss google gadget is for igoogle? can it be implement in my index.php file at hakimct.freehostia.com?

if mONey is lOSt nOThINg is lOSt,
if cHArACtER is lOSt sOMeTHiNG is lOSt,
bUT,
if rELiGIon and eDUcATiON aRE lOSt eVErYThINg is lOSt.

13

Re: problem include extern.php

Try using cURL:

<?php

$url = 'http://google.com/';

if (function_exists('curl_init')) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $content = curl_exec($ch);
    curl_close($ch);
    
    echo $content;
}
else echo 'No cURL library!';

?>

14

Re: problem include extern.php

This seems like a complicated error that takes time to figure out how to fix it. Hope to find the solution soon.