Jump to content

Fsoft

Members
  • Posts

    68
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.MyFWB.co.cc

Profile Information

  • Gender
    Male
  • Location
    Paris, France!

Fsoft's Achievements

Member

Member (2/5)

0

Reputation

  1. Why I can't imagine any good reason for blocking a type of browser. That must be the user agent switcher for firefox I love that plugin for websites that block firefox. But fixing this in javascript won't help you resolve this. here is the reason : http://www.phpfreaks.com/forums/index.php/topic,264100.0.html
  2. Hello, I need a small help , I used this fuction : function get_user_browser() { $u_agent = $_SERVER['HTTP_USER_AGENT']; $ub = ''; if(preg_match('/MSIE/i',$u_agent)) { $ub = "ie"; } elseif(preg_match('/Firefox/i',$u_agent)) { $ub = "firefox"; } elseif(preg_match('/Safari/i',$u_agent)) { $ub = "safari"; } elseif(preg_match('/Chrome/i',$u_agent)) { $ub = "chrome"; } elseif(preg_match('/Flock/i',$u_agent)) { $ub = "flock"; } elseif(preg_match('/Opera/i',$u_agent)) { $ub = "opera"; } return $ub; } $browser = get_user_browser(); if($browser == "ie") { }else { echo "<center><b>Sorry but our system says that you are not using Microsoft Internet Explorer.<br> You can not access this with any other browser.. <br>You must use Internet explorer to explore this site.. <br>Thanks for understanding, Please try again later with Internet Explorer.</b></center>"; exit(); } This function I found on php.net while searching for a good function of browser detection, the problem is due to some reasons I want my site to open in Only Internet explorer. It seemed to work totally nice and correctly, all the browsers used to show error else then IE. But my friend just installed a plugin available for firefox, using that you can make your firefox IE, which means all the scripts will think your browser is IE but actually it is firfox SO this function actually failed .. I want to know if there is a good simple function in JAVASCRIPT which can detect if browser is IE or not? Please help, I am null in javascript, never did. Please help. Thank you very much...
  3. Hello, Sir I am getting a problem .. I have a script like this : file1.php <?php SESSION_START(); $_SESSION["see"] = "ok"; echo "<embed src=\"file2.php\" width=\"200\" height=\"200\"> ?> file2.php <?php SESSION_START(); if($_SESSION["seen"] == "yes") { echo "Our system says that you already saw the video once."; exit(); } if($_SESSION["see"] == "ok") { echo "http://site.com/love.wmv"; $_SESSION["seen"] = "yes"; } Well, as the code says, if some one goes to file1, he gets a WM player which is linked to file2.php In file2, using php SESSIONS, if you go for the first time, your video will work, but if you refresh the page of something, the video will not work, it means even if you try to go to file2.php to get the .wmv file link, you cant. Now the problem is, it works this way in IE and chrome, problem is in firefox. In firefox, if I go to file1.php , video player is OK, then If I try to go to file2.php, I get error saying you already saw the video. THE problem is, if I restart firefox, go to first page, and instead of going directly to file2, I go to source code of file1 and in that <embed> code, I click on file2.php , I am able to see the .wmv file link IF I refresh the source code window, I get the error. I don't want people to see the .wmv file link if they do this way.. Any help available?? Thanks a lot.
  4. Hello, I have a problem in understanding time(); what is this function for? if I echo out the time of today (NOW). And if I want it to be delete after exactly one month. HOw can I do it using time() function. FAISAL!
  5. Hello, $sid = session_id(); echo "<embed height=\"399\" width=\"415\" volume=\"0\" showtracker=\"0\" showpositioncontrols=\"0\" showgotobar=\"0\" showdisplay=\"0\" showaudiocontrols=\"1\" showcontrols=\"1\" sendplaystatechangeevents=\"-1\" sendmousemoveevents=\"0\" sendmouseclickevents=\"0\" sendkeyboardevents=\"0\" senderrorevents=\"-1\" sendwarningevents=\"-1\" sendopenstatechangeevents=\"-1\" enabletracker=\"-1\" enablefullscreencontrols=\"1\" enablepositioncontrols=\"-1\" enablecontextmenu=\"0\" enabled=\"-1\" displaysize=\"4\" displaymode=\"0\" allowchangedisplaysize=\"-1\" allowscan=\"-1\" autosize=\"-1\" showstatusbar=\"1\" autostart=\"1\" allowfullscreen=\"true\" bgcolor=\"#000000\" id=\"wmplayer\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" type=\"application/x-mplayer2\" src=\"link.php?token=$sid\" mediawrapchecked=\"true\"/>"; Small problem using this code, when the <embed> hits link.php, it is suppose to give if($_GET["token"] == SESSION_ID()) { } as true when I put this statement in link.php But it is not giving it as true I am not able to use if statement for some security. Please help FAISAL!
  6. Well, The real reason of doing this all is , not any one else to know our real mms code. Now, if you see code carefully, I want users to visit video.php (in order to get the link of link.php get working). Lets be more logical, I know how to do this with any thing, such as text, or images, but currectly this <embed> src="link.php" Is not working, so I am trying to find out some good solution, I want the mms link staying inside of link.php must only load only if video.php is being loaded, if some one tries to directly access link.php he shouldn't get the mms link. He is suppose to get an error saying, that please visit the video.php in order to video the mms video. I hope I was clear enough, isn't?? FAISAL
  7. Well, using your solution, I get two problem(s). 1. After visiting one time (video.php) some one makes a session, and that session is valid for 25 minutes, after if some one directly access the link.php, he can easily see the link. 2. The player still doesn't play up the media, even after using SESSION, when I src=link.php It doesn't play the data and when I visit link.php directly, it shows mms link. Help please. FAISAL!
  8. Hello, I use this code for my video.php <?php $permission = "yes"; echo "<embed height=\"399\" width=\"415\" volume=\"0\" showtracker=\"0\" showpositioncontrols=\"0\" showgotobar=\"0\" showdisplay=\"0\" showaudiocontrols=\"1\" showcontrols=\"1\" sendplaystatechangeevents=\"-1\" sendmousemoveevents=\"0\" sendmouseclickevents=\"0\" sendkeyboardevents=\"0\" senderrorevents=\"-1\" sendwarningevents=\"-1\" sendopenstatechangeevents=\"-1\" enabletracker=\"-1\" enablefullscreencontrols=\"1\" enablepositioncontrols=\"-1\" enablecontextmenu=\"0\" enabled=\"-1\" displaysize=\"4\" displaymode=\"0\" allowchangedisplaysize=\"-1\" allowscan=\"-1\" autosize=\"-1\" showstatusbar=\"1\" autostart=\"1\" allowfullscreen=\"true\" bgcolor=\"#000000\" id=\"wmplayer\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" type=\"application/x-mplayer2\" src=\"link.php\" mediawrapchecked=\"true\"/>"; ?> and link.php is <?php if($permission == "yes") { echo "mms://site.com/stream"; }else { echo "sorry but you do not have the permission to see this stream"; } ?> Now as you can see, on the video.php, the variable $permission gets a value of yes. After when I echo the embed code out, in that file, I put src=link.php ; normally when "src" hits link.php it must get my stream link and start working, but actually this is not the case. It doesn't work .. When I simply require(); or include(); my link.php in video.php (to check if $permission is working fine). It shows me up the correct mms link. But it is not working with the <embed> . I am doing this, because I don't want others to see my stream code (mms code). In this way, they will only see link.php , and if they try to browse link.php directly, the $permission will be blank (empty) and they will get the error. Every thing is suppose to work normal, but it doesn't.. Please help.. Thanks alot. Faisal!!!!!
  9. Well, I removed the stripslashes from my security function : Now when I go to mysql database and see , I can find : But when I see in my output file, I see : he is cool you are not lke him he is the best It just gives up the text in one line. But in real, it is in three lines that is confusing Please help. FAISAL!
  10. Hello, I use a HTML form and when I write data, to my database.. This is a test article. Everything should look like this. Life is good, I love my life. But when I get back the result, it gives me : This is a test article.rnrnEverything should look like this.rnrnLife is good, I love my life. Please help me.. I really need help, why it's giving me this text like this? Thanks, FAISAL!
  11. Hello, I have a problem with MySQL pagination, infact I saw the pagination tutorial here on the server but it was quite complicated for me so I thought to use "LIMIT" to paginate.. Every thing seems to work as I planned and wnted it to work the only problem is ; using SELECT * FROM `articles` LIMIT 0 , 10 It shows me all the articles from 0 to 10. after when I do SELECT * FROM `articles` LIMIT 10, 20 It shows me up twenty articles from 0 to 20. I want it to show me 10 articles from 10 to 20 as I write in command.. What's the problem with it?? Is there some thing worng with the command??? Thanks a lot, Faisal!
  12. The code seems to be simple and it is.. but it is not working Please can you have a look on it?
  13. Hello sir/madem , <form method="POST" action="login.php"> <p align="center">username : <input type="text" name="T1" size="20"></p> <p align="center">password : <input type="password" name="T2" size="20"></p> <p align="center"><input type="submit" value="Submit" name="B1"></p> <p align="center">Username and password can't contain less than 6 chars.</p> </form> Using this code, I made a form which contains username and password field. The only problem is that I don't wan't submit button to submit info to my php file until it verifies that the username and password contains more than 6 chars and (or) is not blank. I can do this verifiction in my php file, but the only problem is for that it will take time as will submit info to php file and then wait for the answer and so on.. I can do this with some really simple javascript integrated in same page??? I have 0% knowledge of Javascript please help me with this.. Some thing really very simple so that I can learn that easily also.. Thanks a lot, Faisal
  14. `Hello, $query10 = mysql_query("SELECT * from articles where art_cat = $cat"); echo " "; echo "There are "; $count = 0; while($query11 = mysql_fetch_array($query10)) { $countfinal = $count+1; } echo $countfinal; } Sir, I am stuck here, I have 19 articles in my table, And I want to echo out "There are 19 articles." Using this code it only gives out There are 1 articles.. I don't know why this code is not working Please help, thanks. FAISAL!!!
  15. Hello, <?php $query = mysql_query("SELECT * from articles ORDER BY art_id DESC"); while($info = mysql_fetch_array($query)) { echo $info["art_name"]; } ?> Using this code, I am successfully able to print out (echo) all the article names in DESC order, the problem is I have 100 article names and I don't want them to echo on same page.. I want 10 articles on every page.. and then at the end of page, some thing like "Next..." when some one click on Next, they will see the names from 10 to 20 and then so on.. from 20 to 30, 30 to 40 ... Please help friends I am stuck. Thanks a lot. Faisal!!!
×
×
  • 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.