Jump to content

gdfhghjdfghgfhf

Members
  • Posts

    218
  • Joined

  • Last visited

Everything posted by gdfhghjdfghgfhf

  1. No, nothing in phpinfo about that what do i need to add to php.ini and what is the ssh command to do it ?
  2. Sorry i'm not sure what you mean :/ ... still a beginner with the advanced php stuff
  3. I'm trying to install the rar package. I checked php.net's installation docs and it just said to execute pecl -v install rar i did it and rebooted server but its still not working. i'm very noob with the linux stuff so maybe did i do something wrong ? i'm trying to execute this script, i found it on php.net docs so it should be working: how can i check if rar package was successfully installed ?
  4. I use ZipArchive(); to list the file names inside a Zip archive (uploaded on FTP by different users, not created by server). Problem is that some of the file names contain french caracters (accents like é à ô â à è) that are not displayed proprely. Instead i get a "�" symbol. The page is encoded in utf8 and the rest of the script doesnt have any problem with accents i tried running htmlentities() or utf8_encode() on $toune but it didnt help... here's my code:
  5. Nice, thanks a lot ! I didn't think about that and i think i fixed my problem using QUERY_STRING !
  6. Ok i'm desperate now There is no solution to my problem ? Any other way i could escape those characters ?
  7. Damn.. Then would it be possible to base64 encode the url with the htaccess ? so the htaccess would transform http://www.pirate-punk.com/Bérurier Noir + Haine Brigade - Split 7'' Ep.zip topirate-punk.com/dl.php?f=QulydXJpZXIgTm9pciArIEhhaW5lIEJyaWdhZGUgLSBTcGxpdCA3JycgRXAuemlw Special characters wouldn't be a problem anymore
  8. Still getting an Internal Server Error, same thing is displayed in the log
  9. I can't. This is a server where a group of users upload files through FTP. Then they access their file by using the URL http://www.pirate-punk.com/thefile.zip where "thefile.zip" is the file they have uploaded through FTP. This is public URL is just an htaccess "virtual url" (rewriting) to access the real URL at = pirate-punk.com/dl.php?f=thefile.zip Then this PHP file will locate the file on the server and generate a rawurlencode'd link. Everything works perfectly except then i use plus signs or "&" symbols because it breaks the GET['f'] in dl.php Working examples: http://www.pirate-punk.com/86 Crew - 2000 - Bad Bad Reggae.zip Also works with accents: http://www.pirate-punk.com/Affliction - De La Révolte A La Révolution.zip The problem is only when the filename has characters like + or & I need to find a way to escape the + and & in the htaccess file that passes the filename to dl.php ... is it possible to base64 encode the filename in the htaccess ? so the htaccess would transform http://www.pirate-punk.com/Bérurier Noir + Haine Brigade - Split 7'' Ep.zip to http://www.pirate-punk.com/dl.php?f=QulydXJpZXIgTm9pciArIEhhaW5lIEJyaWdhZGUgLSBTcGxpdCA3JycgRXAuemlw Then dl.php could decode the base64 and the problems with + and & would be avoided.
  10. Yes i'm sure. See here: http://www.pirate-punk.com/Bérurier Noir + Haine Brigade - Split 7'' Ep.zip It will display this page: http://www.pirate-punk.com/dl.php?f=Bérurier Noir + Haine Brigade - Split 7'' Ep.zip i added a line to display the value of $_GET['f'] on the top of the page, and as you can see the plus sign is missing. When i tried your code in my htaccess, i got an Internal Server Error
  11. This htaccess is used to make user-friendly URL for downloads. http://example.com/some_file_to_download.zip will redirect to the download page at http://example.com/dl.php?f=some_file_to_download.zip Problem is that when the filename contains special characters like + or &, it will mess up the GET variable of dl.php Example of a problematic URL: http://example.com/file&special+characters will redirect to http://example.com/dl.php?f=file&special+chracters So we have a problem here. How can i escape those special characters in my htaccess file ? I have no control over the original URL (before it is being redirected to dl.php) so i can't just use php to urlencode.
  12. i got a script that will look for a specific file on my server and then return a link to access the file. Problem is that if the search query includes parenthesis the script will not return anything. For example, if $search = "test(test)test[test].zip" the script will not return anything even if the file test(test)test[test].zip exist on the server how can i fix it ?
  13. I'm using this code to display the list of files inside a zip files: $za = new ZipArchive(); $za->open($decode); for( $i = 0; $i < $za->numFiles; $i++ ){ $stat = $za->statIndex( $i ); $tounes = array( basename( $stat['name'] ) . PHP_EOL ); foreach($tounes as $toune) { echo "• $toune<br>"; } } Now i'm trying to find a way to make it work for other type of compressed files: rar, 7z, tar & gz I found the RarArchive function, but if i replace ZipArchive by RarArchive in this code it won't work
  14. I have a FTP shared with friends where we upload underground music albums and then we use the links to share the downloads in a music forum. Problem is that the album names are in french so there is a lot of special characters in the name So the URL looks like *http://www.mydomain.com/downloads/Some Band - En français avec des caractères spéciaux (2013) [7'' EP].zip* For me it works perfectly and i can download the file by using this URL but i have read everywhere that special chars are bad in URL. Is there any reason why i MUST remove the special characters or encode the URL ? Is everyone able to access an URL with special characters or some older browsers won't be able to download the file ? I really don't care about SEO or anything else. I just want the download links to work for everyone. Since the files are uploaded through FTP i can't use PHP to remove the special chars with regex so i really don't know what to do.
  15. i switched to a dedicated server and yes, magic quotes are on. i just turned it off and it is working again thanks a lot
  16. Any help ? I'm willing to pay if someone can fix this bug for me. Just tell me how much
  17. Ok let's start with the first part https://www.ni-dieu-ni-maitre.com/cookie1.php First time you load the page (before cookie is created) it works, but as soon as the cookie already exist the code try to add the $articleid to the existing array but the page returns an error. I already explained what it's supposed to do but let me be more precise: This code is used in a t-shirts shop. Each t-shirts has it's own page and each t-shirt has an article ID. On each t-shirt's page, the code i posted above is running and it is supposed to add the current articleid to an array (lastviewedarticles) On another page, another script (the code i posted in the second quote of my first post) will extract the articles ID from the array inside the cookie and display a list of the last visited articles ID The objective is to list the last 5 t-shirts viewed by the users, using the articles ID.
  18. I've been using this script since a few months and it was working perfectly until i switched host (and php version) Basically the script is used to put the page ID inside an array in a cookie, each time a page is visited. Then on another page, the list of the last visited page ID's Here is the first part that will put the page ID inside a cookie: And now the second part that will output the list of the last 5 visited page id's: Any idea why it suddently stopped working ? I don't remember having edited something since a while.
  19. There's a function in the shoutbox that will scroll it down to the last message each time a new message is sent. Maybe we could use this function and execute it when clicking to open the sliding panel ? could be one of those functions: Then i would just have to add it to my sliding panel script: Any idea how i could do that ? My javascript skills sucks...
  20. I have just installed the ShoutCloud shoutbox. The shoutbox is supposed to scroll down to the bottom of the page when loaded (to display the last message). It works perfectly when i put in an iframe. However, when i put the same iframe inside my sliding panel, it starts without being scrolled-down On this page you can see both in action : http://www.pirate-punk.net/test.html it's working in the iframe on the right of the page but when you click on the left to open the "T'chat" sliding panel, the iframe isn't scrolled down. I would really appreciate help to fix this problem ! Thanks Note: it's working with Chrome but not with Firefox
  21. Yeah i would need cookies since i want to track even if the visitor leave the website. So i have an $articleid on each pages, how could i put it in an array or something each time a page is visited, and then retrieve the list of $articleid ? I have really no experience with cookies, i dont know how to do that
  22. I have very little experience with cookies so i don't know how to do that I have a t-shirt shop where each t-shirt has an $articleID Each time an user visits a t-shirt page, i would like to add the $articleID to a cookie. Add it to an array or something so i can retrieve it later. Then on the main page, i want to retrieve the list of the last 5 $articleID visited and display a list of the ID How could i do that ? thanks!
×
×
  • 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.