Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. You need to be careful when setting your include path that you don't wipe out what was originally in there. This may prevent you from using things like pear. So, instead of.... <?php set_include_path($_SERVER['DOCUMENT_ROOT']); ?> You might want..... <?php set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT']); ?> I would also be more inclined to actually put the common directory on my path if that's where all your common functionality lives.
  2. No, that would not work. Firstly, because $_SERVER['HTTP_REFERER'] should always be set, and secondly, because it has nothing to do with determining what domain your site is being accessed on. Did you read my previous reply?
  3. file_get_contents() will work fine, you just need to call the file via a url (and have the server process it) instead of a file system path. eg; $xml = file_get_contents('http://yourdomain.com/file.xml');
  4. ps_show_boxed has nothing to do with html. Yes, you warp your results in whatever html is needed to create the effect your looking for.
  5. You would be much better of looking into set_include_path then putting all your libraries within your include path.
  6. trq

    procmail to php

    Oh, and no, you can't leave that line blank. You would need a pattern that matches all. See http://www.perlcode.org/tutorials/procmail/regular_expressions.pod As for standard in, see http://php.net/manual/en/features.commandline.io-streams.php
  7. trq

    procmail to php

    I believe you would also need to use the global procmailrc file not just the one within your ~/ directory.
  8. You can check for the domain name using $_SERVER['SERVER_NAME']
  9. echo it. Then in jQuery you need to create a function to handle the response.
  10. Scripts execute from top to bottom, what exactly do you expect to happen?
  11. trq

    procmail to php

    The second line is where the pattern matching happens. You'll find plenty of tutorials around for this. The contents of the email will show up in the standard in of your php script.
  12. trq

    procmail to php

    There should be plenty of examples of this around on the net, but basically, in ~/.procmailrc you use patterns to match email addresses (or subject lines) and determin what to do with the email (generally sending them to a different inbox). This can be used to pipe an email to a php script. eg; :0: * ^To.whatever@foo.com | /usr/local/bin/script.php
  13. WAMP uses the same php as (most of) the rest of us.
  14. Assuming your talking about a VPS you need to login to that machine and install php. You can't simply map it to a network drive and execute an installer to get it installed. You need to provide much more information because at the moment, the steps you have described do not make allot of sense.
  15. Where? You don't.
  16. Again, you are not calling the parents __construct().
  17. Yeah I am, I just missed copying and pasting it on the site. If your not going to post your actual code we can't help. Were not here to play guess.
  18. Post your current code.
  19. This has nothing to do with php. You'll want to look at the 'sticky bit' setting on the directories in question.
  20. Yes, more than likely such a script exists. However, this board is for help with code, not help looking for it.
  21. In reality, you really should learn php progressively. Starting with the basics then moving forward to more advanced stuff. Jumping all over the place learning this and that is a recipe for picking up bad habits and poor practices. There's a free book/wiki in my signature (Hudzilla) that's pretty good.
  22. There is an Include directive available within the Apache config files. This directive also allows wildcards. So, you could use something like.... Include /var/www/vhosts/*.conf Within your httpd.conf file. This would make it much easier as you could now use php to simply create new .conf files (one for each vhost) within /var/www/vhosts This is similar to how my CMS used to work.
  23. The web doesn't really work like that. Your response is generally built and then sent. You can muck around with output buffering but its pretty unreliable at best.
  24. Looks like you want to take a look at imap.
×
×
  • 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.