+ Reply to Thread
Results 1 to 5 of 5

Thread: Weird PHP problems

  1. #1
    PSP-Heaven is offline x10 Sophmore PSP-Heaven is an unknown quantity at this point
    Join Date
    May 2006
    Posts
    214

    Weird PHP problems

    Okay, the code for the PHP fetching seems to have gone weird. Here's the error:

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/teamxl/public_html/arcade/loadgame.php on line 31

    Warning: include(http://www.teamxl.biz/arcade/rx/raidenx.html) [function.include]: failed to open stream: no suitable wrapper could be found in /home/teamxl/public_html/arcade/loadgame.php on line 31

    Warning: include() [function.include]: Failed opening 'http://www.teamxl.biz/arcade/rx/raidenx.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/teamxl/public_html/arcade/loadgame.php on line 31


    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/teamxl/public_html/arcade/loadgame.php on line 59

    Warning: include(http://staff.x10hosting.com/adCode.php?ad=advanced) [function.include]: failed to open stream: no suitable wrapper could be found in /home/teamxl/public_html/arcade/loadgame.php on line 59

    Warning: include() [function.include]: Failed opening
    And, here's the code:

    <html>
    <head><title>Arcade</title></head>
    <body>
    <?php
    // Get the game passed from the Javascript link
    if(isset($_GET['gamename']))
    $game = $_GET['gamename'];
    else
    $game = "";

    // Display the game we want depending on the name passed.
    if($game == "realinvaders") {
    include("http://www.teamxl.biz/arcade/ri/ri.html");
    }
    else if($game == "jbreakout") {
    include("http://www.teamxl.biz/arcade/jbreakout/JBreakout.html");
    }
    else if($game == "xraye") {
    include("http://www.teamxl.biz/arcade/xr/xr.html");
    }
    else if($game == "spaceescape") {
    include("http://www.teamxl.biz/arcade/se/spaceescape.html");
    }
    else if($game == "gyroball") {
    include("http://www.teamxl.biz/arcade/gb/gyroball.html");
    }
    else if($game == "crimsonviper") {
    include("http://www.teamxl.biz/arcade/cv/crimsonviper.html");
    }
    else if($game == "raidenx") {
    include("http://www.teamxl.biz/arcade/rx/raidenx.html");
    }
    else if($game == "flashtrek2") {
    include("http://www.teamxl.biz/arcade/ft2/flashtrek2.html");
    }
    else if($game == "commando3") {
    include("http://www.teamxl.biz/arcade/c3/commando3.html");
    }
    else if($game == "territorywar") {
    include("http://www.teamxl.biz/arcade/tw/territorywar.html");
    }
    // To prevent direct linking
    else if($game == "") {
    print "You a damn loser.";
    }
    else if($game == " ") {
    print "You a damn loser.";
    }
    // Finish the rest of the games in your arcade using the same format
    else {
    echo "Sorry, that game wasn't found.";
    }
    ?>

    <br>
    <center>
    <?php
    // Display the ad code.
    include("http://staff.x10hosting.com/adCode.php?ad=advanced");
    ?>
    </center>
    </body>
    </html>
    Domainlagoon.com
    Win a free domain, you only need to complete a few offers. I am amazed to, you can get .com, .org, .biz, .net, and others for 9.95 points. While for 4 points you can get a .info domain. It's even better than ezyrewards.



    Before I had to switch to dial up, man I miss these speeds.


  2. #2
    amr1991's Avatar
    amr1991 is offline x10 Sophmore amr1991 is an unknown quantity at this point
    Join Date
    Jul 2006
    Posts
    198

    Re: Weird PHP problems

    here is your problem, never type the full URL in the include or require function.

    try this

    include($_SERVER['DOCUMENT_ROOT'] . "/root/to/game");

    make sure to include the first /
    Last edited by amr1991; 05-02-2007 at 08:05 PM.





  3. #3
    t2t2t's Avatar
    t2t2t is offline x10 Elder t2t2t is an unknown quantity at this point
    Join Date
    Sep 2006
    Location
    Europe, Estonia
    Posts
    690

    Re: Weird PHP problems

    Quote Originally Posted by amr1991 View Post
    here is your problem, never type the full URL in the include or require function.

    try this

    include($_SERVER['DOCUMENT_ROOT'] . "/root/to/game");

    make sure to include the first /
    Or relative path to the file:

    include 'games/gamename.htm';

    If you want to get data from outside than your site:

    Redirect to:
    (must be on first-second-before any print-or die-or anything else that outputs anything-first)

    header('Refresh: 3; url=http://www.example.com/game.php');

    Include:

    print file_get_contents('http://www.example.com/game.php');
    This post has been marked spam 52 times.


  4. #4
    Cubeform is offline x10 Lieutenant Cubeform is an unknown quantity at this point
    Join Date
    Aug 2006
    Location
    127.0.0.1
    Posts
    339

    Re: Weird PHP problems

    Try file_get_contents() instead of include().
    CUBEFORM
    XHTML | CSS | PHP | JavaScript
    THIS WEEK


  5. #5
    PSP-Heaven is offline x10 Sophmore PSP-Heaven is an unknown quantity at this point
    Join Date
    May 2006
    Posts
    214

    Re: Weird PHP problems

    Thanks guys, it fixed all the errors!
    Domainlagoon.com
    Win a free domain, you only need to complete a few offers. I am amazed to, you can get .com, .org, .biz, .net, and others for 9.95 points. While for 4 points you can get a .info domain. It's even better than ezyrewards.



    Before I had to switch to dial up, man I miss these speeds.


+ Reply to Thread

Similar Threads

  1. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  2. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 10:07 AM
  3. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  4. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM
  5. If You're Having PHP Problems With Your Site
    By TranceOperator in forum Free Hosting
    Replies: 3
    Last Post: 09-02-2005, 12:23 PM

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