TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 04:39:56 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,105
  • Total Topics: 21,213
  • Online today: 142
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 207
  • Total: 207

A little help needed with PHP

Started by akulion, September 17, 2006, 11:03:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

akulion

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

What's the character between include and the double quote? That may be your problem. Try

include "./path-to-peace.net/forum/SSI.php";

akulion

#2
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

JPDeni

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

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

ok found it i think

if im not mistaken this is the function:

ssi_logOnline();


Porky

is there a master list of ssi functions

akulion

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

IchBin

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....