Jump to content

how to recognise webpage.


seany123

Recommended Posts

is there some way of checking the pagename in php?

 

for example, home.php

 

 

also on a side question does anyone know how to autoplay a .avi video without showing anything but the actual video.. (im meaning i dont want to see the progress bar or play, stop, pause buttons etc)

 

all help would be great.

Link to comment
Share on other sites

You can get the current file's name by using

 

basename($_SERVER['SCRIPT_NAME']);

 

To use like

 

if (basename($_SERVER['SCRIPT_NAME']) != "home.php") {
     reject user
}

 

Not sure if that's what you mean though...

Link to comment
Share on other sites

Look at the server superglobals.  $_SERVER[]  ... there are a few that may do what you want.. the one off the top of my head is $_SERVER['PHP_SELF']

 

As for the video, you will probably have to look into a custom player ( or use HTML 5's video tag (read long and hard about this before you use it)

Link to comment
Share on other sites

thanks for the answers.

 

Look at the server superglobals.  $_SERVER[]  ... there are a few that may do what you want.. the one off the top of my head is $_SERVER['PHP_SELF']

 

As for the video, you will probably have to look into a custom player ( or use HTML 5's video tag (read long and hard about this before you use it)

 

why should i read long and hard about it before use?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.