Jump to content

hackalive

Members
  • Posts

    652
  • Joined

  • Last visited

Everything posted by hackalive

  1. Repeat of code from original post $file_info = new finfo(FILEINFO_MIME); // object oriented approach! $mime_type = $file_info->buffer(file_get_contents($file)); // e.g. gives "image/jpeg" switch($mime_type) { case "image/jpeg": echo "IMAGE"; }
  2. I already have $mime_type = $file_info->buffer(file_get_contents($file)); // e.g. gives "image/jpeg"
  3. Hi guys I am using this code: $file_info = new finfo(FILEINFO_MIME); // object oriented approach! $mime_type = $file_info->buffer(file_get_contents($file)); // e.g. gives "image/jpeg" switch($mime_type) { case "image/jpeg": echo "IMAGE"; } However the code is returning: How can I make it so it does not return a charset etc? Thanks
  4. so by firewall you mean make sure no incomming or outgoing connections are possible except to the IP of the webserver (do this on the storage server)?
  5. Cant do VPNs as I am allowing others to add their server to mine too. Also note it will be SSL and HTTPS
  6. Hi guys, I have this concept and wanted to know your opinions. So basically there is my web-server offiste and a storage server onsite (two separate locations). To get the web-server to pull content via PHP from the storage server it communicates using SSL over HTTPS. To make it so not just anyone can get the data via the HTTPS path you would also pair the IPs (so ensure static IPs) and also do some form of token handshake (like oAuth but a custom library). Would this be secure? Or not really? Cheers
  7. thorpe - to be blunt and simple - no one has said how to get it to work with this code and where to but vendor data or includes. So simply put it does not work at all. Ive put composer.phar and .json in the php folder - run the composer phar install its created the vendor folder I put the vendor folder outside of the webroot - then what - does not matter where i put this folder it does not work - how do i link it to the libraries etc? thorpe - if you could take the time to clearly layout the process I need to undertake that would be fantastic.
  8. "Intsalling" composer was not hard - getting it and this to work is.
  9. storagepdo.php in the same directory as what? the vendor folder - the root - what?
  10. For an oAUth library? That will take too long
  11. As I said before - the developer has said it MUST USE http://getcomposer.org/ not PHP method.
  12. either it cant find the file or if i point it more absolute the same error as above. If you download it and give it a try you will see what I mean.
  13. I cannot get it to work, so if you can tell me how to make it all work then I gladly will, since the require_once is causing errors too.
  14. require_once() the relevant files. Unfortunately this is not working either - if you can suggest how to make it work that would be great
  15. Actually - forget all of the above Can someone just tell me how to change the code to not use an auto-loader at all - decided more hassle than its worth. Thanks
  16. This is the one I need to use apparently: http://getcomposer.org/ But have no idea how to make it work on Windows with Apache and PHP. (FYI - I do have full server access) Thanks
  17. Apparently it is because I am not using an autoloader ... if anyone can tell me how to setup and configure and auto-loader for Windows with Apache and PHP that would be great
  18. Hi guys, I've implemented this library https://github.com/zircote/oauth2-php However when visiting authorize.php (or any page using 'A:\public\OAuth2\Storage\StoragePdo.php') I get the following error:" The relevant code from A:\public\OAuth2\Storage\StoragePdo.php is: <?php /** * @category OAuth2 * @package OAuth2 * @file * Sample OAuth2 Library PDO DB Implementation. * * Simply pass in a configured PDO class, eg: * new OAuth2StoragePDO( new PDO('mysql:dbname=mydb;host=localhost', 'user', 'pass') ); */ namespace OAuth2\Storage; use OAuth2\Grant\GrantCodeInterface, OAuth2\RefreshTokensInterface, PDOException, PDO; /** * PDO storage engine for the OAuth2 Library. * * IMPORTANT: This is provided as an example only. In production you may implement * a client-specific salt in the OAuth2StoragePDO::hash() and possibly other goodies. * *** The point is, use this as an EXAMPLE ONLY. *** */ class StoragePdo implements GrantCodeInterface, RefreshTokensInterface { If anyone can tell me why this is happening and how to fix it that would be greatly appreciated. Cheers
  19. Hi guys, I have been using a PHP login system and it is setting a session "PHPSESSID", however I want to build and use a system more like Facebook - where your session can be remembered past the current browser session and also call the "cookies" names other than PHPSESSID. How can I do this? Any tuts or advice would be greatly appreciated. Thanks FYI - Facebook sets cookies like 'c_user', 'csm' etc
  20. Solution - Host on another domain.
  21. security A third party develops on the subdomain in question.
  22. For my application his solution is no good.
  23. I have the cookie/session setting to ".mydomain.com" which is great, but I need it to be ".mydomain.com" except "exception.mydomain.com" but it would still apply to mydomain.com and all its other subdomains.
  24. Hi guys, I want a PHP Cookie & Session to apply to both the domain and all its subdomains, except one specific subdomain which I never want the same cookies/sessions to apply to. I have the apply too all sorted, just not the exception. Any help is much appreciated.
  25. I am implementing that now. I just wanted to get the header stuff to work first.
×
×
  • 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.