+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Connection timed out

  1. #1
    hsr_sr is offline x10Hosting Member hsr_sr is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    23

    Connection timed out

    WHY IS THIS HAPPENING ?

    type 2 here and see

    http://erepindia.x10hosting.com/platoon/platoon.php

  2. #2
    xadrieth is offline x10Hosting Member xadrieth is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    62

    Re: Connection timed out

    Well, when I ran it, it took about half a minute, I got the same page, but telling me that "Line 34 of platoon.php, file_get_contents(): Stream failed".

    And seeing that it is trying to reference another website (http://api.erepublik.com/v1/feeds/citizens/2), thats the problem.

    x10hosting doesn't allow you to get file contents from other sites, unless your using an "href/rel/src" element in an HTML tag.

  3. #3
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: Connection timed out

    If you check correctly, the page you want to add doesn't exist: http://api.erepublik.com/v1/feeds/citizens/1
    Try finding the page that works, that might resolve the problem.
    Last edited by xav0989; 09-22-2009 at 10:01 PM.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  4. #4
    hsr_sr is offline x10Hosting Member hsr_sr is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    23

    Re: Connection timed out

    Quote Originally Posted by xadrieth View Post
    Well, when I ran it, it took about half a minute, I got the same page, but telling me that "Line 34 of platoon.php, file_get_contents(): Stream failed".

    And seeing that it is trying to reference another website (http://api.erepublik.com/v1/feeds/citizens/2), thats the problem.

    x10hosting doesn't allow you to get file contents from other sites, unless your using an "href/rel/src" element in an HTML tag.
    its PHP code
    and it works like a charm for my friend on chopin


    wAT shuld i change in this?

    Code:
    $file_contents = file_get_contents($filename);
    Edit:
    Quote Originally Posted by xav0989 View Post
    If you check correctly, the page you want to add doesn't exist: http://api.erepublik.com/v1/feeds/citizens/1
    Try finding the page that works, that might resolve the problem.
    leave 1 try 2 i said
    Last edited by hsr_sr; 09-22-2009 at 10:08 PM. Reason: Automerged Doublepost

  5. #5
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: Connection timed out

    Quote Originally Posted by hsr_sr View Post
    leave 1 try 2 i said
    Woops, didn't read the post completely, my bad!

    Anyways, as xadrieth mentionned, file_get_contents streams are blocked. Basically, your best option would be to learn AJAX and JavaScript and do all what the PHP code does in JavaScript.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  6. #6
    hsr_sr is offline x10Hosting Member hsr_sr is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    23

    Re: Connection timed out

    is there any alternative for that piece of code??

  7. #7
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Connection timed out

    Quote Originally Posted by xadrieth View Post


    x10hosting doesn't allow you to get file contents from other sites, unless your using an "href/rel/src" element in an HTML tag.
    Quote Originally Posted by xav0989 View Post
    Anyways, as xadrieth mentionned, file_get_contents streams are blocked. .

    Wrong. Wrong. Wrong.

    This page

    uses this script:

    PHP Code:
     
    <?php
     
    $stuff 
    file_get_contents'http://api.erepublik.com/v1/feeds/citizens/2' ) ;
    echo 
    $stuff " ;
    ?>
    I am on Chopin.
    Nothing is always absolutely so.

  8. #8
    hsr_sr is offline x10Hosting Member hsr_sr is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    23

    Re: Connection timed out

    what is shown is the above post is true it works for my friend on chopin and not on me on starka
    Edit:
    should i send a support ticket?
    Last edited by hsr_sr; 09-22-2009 at 10:30 PM. Reason: Automerged Doublepost

  9. #9
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Connection timed out

    Well, some admin should look into this. If the free servers are configured differently from each other, how can people know what is what?
    Nothing is always absolutely so.

  10. #10
    hsr_sr is offline x10Hosting Member hsr_sr is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    23

    Re: Connection timed out

    it was working b4 the downtime
    now what should i do most of my scripts are based on this and my site iss based on these scripts

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. FTP Connection Timed out
    By mandogon in forum Free Hosting
    Replies: 1
    Last Post: 12-30-2008, 10:56 AM
  2. (110) Connection timed out
    By lanxce in forum Free Hosting
    Replies: 0
    Last Post: 12-25-2008, 03:27 AM
  3. help me! my IP is blocked
    By Thrasher in forum Free Hosting
    Replies: 69
    Last Post: 03-04-2008, 12:17 AM
  4. Help: Connection Timed Out
    By fireput in forum Free Hosting
    Replies: 1
    Last Post: 11-18-2007, 03:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers