It is currently Thu Mar 28, 2024 9:34 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: function include for URL
PostPosted: Sun Oct 21, 2007 9:58 pm 
Noobie
Noobie

Joined: Tue Jun 12, 2007 3:03 pm
Posts: 5
Until yestarday every works fine. Today not. I ask:

I have in a page of my site in cogia.net, an php function like this:

Code:
<?php include('http://www.thelinktoasite.com'); ?>


but I receive this error:

Warning: main(http://www.thelinktoasite.com): failed to open stream: No route to host

If I go directly to a site 'http://www.thelinktoasite.com' all it's right.

So why the include function work?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 02, 2007 7:47 pm 
Noobie
Noobie

Joined: Wed Jun 28, 2006 6:38 pm
Posts: 34
If i'm correct, the servers here dont let you include outside sites in their own. It has to be locally on your server or you cant.

Try the following and tell me how it goes:

Code:
<?
$content=file_get_contents("http://www.google.com");
echo $content;
?>

_________________
Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 03, 2007 8:45 am 
Noobie
Noobie

Joined: Tue Jun 12, 2007 3:03 pm
Posts: 5
snb828 wrote:
If i'm correct, the servers here dont let you include outside sites in their own. It has to be locally on your server or you cant.

Try the following and tell me how it goes:

Code:
<?
$content=file_get_contents("http://www.google.com");
echo $content;
?>


I try with
Code:
<?php include...?>
and now work. The next time I try your code.

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 03, 2007 9:13 am 
Noobie
Noobie

Joined: Tue Jun 12, 2007 3:03 pm
Posts: 5
Now don't work nothing.... I have this error:

file_get_contents(http://www.mypage.org): failed to open stream: No route to host


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
100WebSpace © 2011