seany123 Posted January 12, 2011 Share Posted January 12, 2011 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. Quote Link to comment Share on other sites More sharing options...
TOA Posted January 12, 2011 Share Posted January 12, 2011 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... Quote Link to comment Share on other sites More sharing options...
chronister Posted January 12, 2011 Share Posted January 12, 2011 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) Quote Link to comment Share on other sites More sharing options...
seany123 Posted January 13, 2011 Author Share Posted January 13, 2011 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? Quote Link to comment Share on other sites More sharing options...
chronister Posted January 14, 2011 Share Posted January 14, 2011 Because with the new video and audio tags, they are not real easy to use. There is no 1 format that works across all browsers and some browsers don't even support them at the moment (I am looking in your direction IE). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.