Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default PHP Help (Very simple!)

    Hello,

    I'm making a PHP script and I've got a problem.

    I get this error:

    Parse error: syntax error, unexpected T_VARIABLE in /home/techhos/public_html/staff/radiospy.php on line 68

    Here is line 66 - 68 (67 has nothing on it).

    $spydata5 = mysql_fetch_array($get_spy_info5);

    $open = fsockopen(""$spydata1['ip']"",""$spydata1['port']"");

    If anyone has any ideas what I'm doing wrong, let me know. Thanks.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  2. #2
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by iUnknown View Post
    Hello,

    I'm making a PHP script and I've got a problem.

    I get this error:

    Parse error: syntax error, unexpected T_VARIABLE in /home/techhos/public_html/staff/radiospy.php on line 68

    Here is line 66 - 68 (67 has nothing on it).

    $spydata5 = mysql_fetch_array($get_spy_info5);

    $open = fsockopen(""$spydata1['ip']"",""$spydata1['port']"");

    If anyone has any ideas what I'm doing wrong, let me know. Thanks.
    I think this should work;

    PHP Code:
    $spydata5 mysql_fetch_array($get_spy_info5);

    $open fsockopen($spydata1['ip'], $spydata1['port']); 
    or if not, then this;

    PHP Code:
    $spydata5 mysql_fetch_array($get_spy_info5);

    $open fsockopen(" . $spydata1['ip'] . "" . $spydata1['port'] . "); 
    Lets set the stage on fire, and hollywood will be jealous.

  3. #3
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    From my knowledge of PHP (not very much... but yeah) the second one should be the one I'm looking for ! Thanks very much. I'll test it and confirm then +rep

    sorry tom! gotta spread!

    thread closed.
    Last edited by iUnknown; 05-07-2008 at 03:24 PM.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  4. #4
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    You want the first one, the second wont work.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  5. #5
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    PHP Code:
    <?php
    $spyData 
    mysql_query"SELECT * FROM table ORDER BY id DESC" ) or die( mysql_error() );
    while ( 
    $spyRow mysql_fetch_array$spyData ) ) {
        
    $ip $spyRow["ip"];
        
    $port $spyRow["port"];
        
    $check = @fsockopen$ip$port );
        if ( 
    $check == false ) {
            echo 
    "Not online..";
        }
        else {
            echo 
    "Online";
        }
    }
    ?>
    Something like that should work.

  6. #6
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    Just to answer your questions, the second one works, and now I've got the script 100% working, wahay.

    Thanks Dentafrice and Tom who helped out along the way.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •