Jump to content

Atomg

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by Atomg

  1. Andy, you'r solution was not working and I was already trying this. Perhaps their is something missing on my server configuration. However doing the following will ALWAYS work (for me...) (adding the header() at the top) [code]<?php // Default content type (allow àéîö...) header("Content-Type: text/html; charset=ISO-8859-1"); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <html lang="fr"> <title>blank page</title> </head> <body> ééé ààà êê ù etc. </body> </html> [/code]
  2. [quote author=Javrixx link=topic=107930.msg438137#msg438137 date=1158770719] 2) Someone had mentioned to me that I can store the files on the server, but not public.  When the user logins in, I would make a php script to create a random temporary folder and move the needed files for that user to the new temporary folder.  After the user logs out the temporary folder is deleted, thus the user's files are never really public, only for a short time when that user is logged in and needs the files.[/quote] I'm sure that this is a good solution, but you don't need to move the file. Their must be a way to download it... I'll search.
  3. Ok, thx. Now can we adjust those chmod settings and make only Read/Write/Execute for users and put a php function that start the download?
  4. Hi all, (hope the little french word won't bug you guys) I have put a form that let any users to send me comments about my website. It is a normal form.. well I think. Their is a problem when we click the submit button. This is the situation: [list] [*]We are logged. [*]We go in support section, where we can fill the form (name, your mail, your message). [*]You clic the submit button. [*]You are redirected to a page that says to you that everything was fine and the e-mail was sent. [*](problem now) If we try to access private section (where you need to be logged in) it does not work anymore. Seems like you have been "unlogged" by sending the form. [*]I say "OK, let's RELOG". I go in the log in form, log in. And I CAN'T log in. The only way to log in back, is to call the session_destroy() function and then to log in back. [/list] ????WHY???? This is the form, how it calls my page. (the support.php page (where you fill in the form) will call the envoie.php page (Where this page have the mail() function)) [code]<form action="index.php?page=envoie" method="post">[/code] I always call index.php and verify the page variable. If it is a private page, I verify the user is logged in before showing something. Also, at each start of my page, I verify the session state like this (if it is not good, say plz): [code]session_start(); if($_GET['cmd'] == "logout") {     session_destroy(); } $auth = false; $auth2 = false; if(isset($_SESSION['nom'])) {     $nom = $_SESSION['nom'];         if($nom == 'theusername') {         $auth = true;     } else if($nom == 'another username') {         $auth2 = true;     } } else {     $nom = $_POST['nom'];     $pwd = $_POST['pw'];         // Verify login     if($nom == "username" & $pwd == "password")     {         $_SESSION['nom'] = $nom;         $auth = true;     }     else if($nom == "anotheruser" & $pwd == "anotherpass")     {         $_SESSION['nom'] = $nom;         $auth2 = true;     } }[/code] Please, if you guys need more info, say and I will give. Thank you for all the help.
  5. [quote author=ToonMariner link=topic=107930.msg433685#msg433685 date=1158175056] if someone gets the full url then they may still be able to see them! Without done the reading have a look at locking the directories and only opening them vis teh script - may be that chmod will be more than enough for your needs. No expert on this but you would need a setting that denies public but allows owner of the dir to access - that way php should be able to chmod the directory. [/quote]So, we could only let the admin (the admin of the website) to access some files? Like the user won't get the file directly, but it is a php function that will download the file for the user? The php function will only download the file if the user can (like verify the loggin etc.) If I use my ftp client, I can change the file properties (chmod) like the following screnshot. [img]http://benice.beadventure.ca/g/images/chmod.png[/img] We can Execute because it is a folder, if it is a *.jpg (for exemple), we won't get the Execute command, but only Read. Well I have questions about this: [list] [*]What is Group? [*]Can we remove the Read for a file for the "World" and have a php function that will download the file? [*]If yes, what if that function?[/list] Thanx for all the help.
  6. [!--quoteo(post=383921:date=Jun 14 2006, 02:03 PM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Jun 14 2006, 02:03 PM) [snapback]383921[/snapback][/div][div class=\'quotemain\'][!--quotec--] You need to look into using sessions. There are many tutorials around for building a login system, and Im afraid from the description of your problem it sounds like you really need to read one. [/quote] Thorpe, I would like to know those websites. Well, tutorials that you think are good to make our own login system. Do you know any that are nice? Thanks a lot.
  7. Is my question too difficult? Should I post it in another forum?
  8. I have a question conerning character encoding and php. I have put the line AddDefaultCharset ISO-8859-1 in my .htaccess file as this makes all my page using the correct encoding. My pages are in french so I need é à ù etc. All my html files are ok. But all my .php files are not. Their is two examples where i write ééé ààà êê ù etc. in html and in php I echo ééé ààà êê ù etc. [a href=\"http://beadventure.ca/test/char/index.html\" target=\"_blank\"]The correct webpage in html[/a] [a href=\"http://beadventure.ca/test/char/index.php\" target=\"_blank\"]The NON-correct webpage in php[/a] I think its in the configuration of php. I'll need to contact my web host but I don't know what to say. And perhaps their is way without the need to contact them. I'm pretty sure that I can change something on my side (like a line of code or something) because I host a phpBB forum on this website (where phpBB forum is in php... lol =) ) and the é à ù are correctly rendered. I know that I can go in my internet otions and change the encoding by myself, but it's not very nice to do... =( I would like some help on this, thank you for your time everyone.
  9. Hi all, I would like to make a php page. In that page, the php code would check if, let's say, 5 web pages are up or down. For example, sometimes when I access a web page and the host server of this webpage is not working (perhaps it is rebooting, or a bug, etc.), I have a error message. I have the php documentation but I don't know what to search in it for this kind of thing. If anyone could help me with that, or only give me some functions I could look up in the php manual, or an existing tutorial, etc. I would be very happy to. Thank you for your help. (edit) Could be a Javascript also (.js) But would like more a php if available. Example: IS OK - google.com NOT OK - ebay.ca IS OK - yahoo.ca IS OK - microsoft.ca NOT OK - thottbot.com
×
×
  • 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.