News: When asking for support, it helps us and you, if you read the Posting Guidelines

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

September 22, 2019, 02:17:27 PM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 188947
  • Total Topics: 20756
  • Online Today: 96
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 2
Guests: 74
Total: 76

Author Topic: A little help needed with PHP  (Read 1515 times)

0 Members and 1 Guest are viewing this topic.

akulion

  • Guest
A little help needed with PHP
« on: September 17, 2006, 04:03:15 PM »
Ok Ive asked down at SMf twice - no answer

I've read through EVERY single thread I could find on SSI function on SMF and after trying everything I have come to a conclusion I really need someone to help me with this.

I am trying to include the SSI.php function "whos online" on custom PHP pages which:

- Some files resides on the same domain as the forum
- Some files reside on a different domain which is on the same server though

Now this is what I've tried:

Quote
<?php
include`"./path-to-peace.net/forum/SSI.php";
ssi_whosOnline();
?>

the above files is jsut a test file to see if it even works

I get this error:

Quote
Parse error: syntax error, unexpected $end in /home/.cash/akulion/path-to-peace.net/whoseonline.php on line 4


can someone help me out here thanks

JPDeni

  • Guest
Re: A little help needed with PHP
« Reply #1 on: September 17, 2006, 04:06:06 PM »
What's the character between include and the double quote? That may be your problem. Try

Code: [Select]
include "./path-to-peace.net/forum/SSI.php";

akulion

  • Guest
Re: A little help needed with PHP
« Reply #2 on: September 17, 2006, 04:15:17 PM »
ohhh my GOD i am so embarassed!!!!

 :uglystupid2:

i didnt even see that there and ive been trying and trying and trying lol!!

thank you so much!!

I guess I really dont have a 'programmers eyes"

thank you so much :D

now i think ill go hide under a rock
« Last Edit: September 17, 2006, 04:17:15 PM by akulion »

JPDeni

  • Guest
Re: A little help needed with PHP
« Reply #3 on: September 17, 2006, 04:19:44 PM »
LOL Not to worry. I've done very similar things, beating my head against a wall, pulling my hair out and then someone else comes along and finds something really simple that's wrong. When we look at something so long, it's easy to overlook the simple things and the only fresh eyes can see them.

Really glad I could help. :)

akulion

  • Guest
Re: A little help needed with PHP
« Reply #4 on: September 17, 2006, 04:39:20 PM »
i have another simple question:

whe i include ssi whos online function into a custom php page, will it count the visitors on that page too? and display them in the board stats?

i ask because basically what i want to achieve is that no matter wether my visitors are on the forum OR on custom pages (outside the forum) - it counts them all and adds them to the total

so kinda like this:

Users: 2
Guests: 3

now in the above only 1 guest is browsing the forum the other 2 are in a completely different part of the site

so will including ssi.php in those files achieve this or do i need to do something else?

akulion

  • Guest
Re: A little help needed with PHP
« Reply #5 on: September 17, 2006, 05:00:57 PM »
ok found it i think

if im not mistaken this is the function:

ssi_logOnline();


Offline Porky

  • Hero Member
  • *****
  • Posts: 608
  • B.A. DBA
    • Facebook!
Re: A little help needed with PHP
« Reply #6 on: September 17, 2006, 05:50:16 PM »
is there a master list of ssi functions

akulion

  • Guest
Re: A little help needed with PHP
« Reply #7 on: September 17, 2006, 05:51:53 PM »
yup

http://www.simplemachines.org/community/ssi_examples.php
the ssi examples fils can also be found in your forum root as well so u can acces it from there too ;)

and for details on them:
http://docs.simplemachines.org/index.php?topic=400

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: A little help needed with PHP
« Reply #8 on: September 17, 2006, 07:54:22 PM »
lol Akulion.... Believe me even people with the "programmers eye" still have these moments. I remember several years ago I was playing with CGI/Perl. I couldn't for the life of me get the damn script to run. Little did I know there was a little rule that I was unaware of. At the end of the CGI script you have to have an empty hard return....