Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: c4n
  • Order by date
  1. c4n

    Mod rewrite to redirect into subdirectories by first letter

    Hello, I'm trying to get this mod rewrite working, but so far wasn't successful. The thing is I have a folder called "viri" with a large number of files inside. To reorganize everything I am creating subdirectories a-z 0-9 and moving all files in the appropriate folder according to their first...
  2. c4n

    RegEx: matching a word not part of another one

    Wow, how simple. I was complicating things too much because I didn't know of the \b for word boundary. Thanks, I learned a lot new today!
  3. c4n

    RegEx: matching a word not part of another one

    Hello, Here is what I want to do. I have this string for example: $text="THIS bla blaTHIS bla THISbla THIS THIS"; Now what I'm trying to do is match only those "THIS" that are separate words and NOT part of other words and replace it with THAT. For example the above should become...
  4. c4n

    RegExp: Replace SRC attribute from <iframe>

    Yes, I also don't use IE much. I found that by testing the code in my PHP editor (from www.dzsoft.com) which has an in-built browser. As for the DOM approach: I haven't got any experience with DOM, will read the manual at http://php.net/dom and see if I can get it to work. Regards, c4n
  5. c4n

    Global Constants

    Hi, what are the lines 2 and 3 in index.tpl.php? Regards, c4n
  6. c4n

    Testing PHP pages

    Hi, EasyPHP (http://www.easyphp.org/) is also installs Apache, PHP, mySQL and phpMyAdmin on Windows computers. This or phpdev should be easier to use if you are just starting, but as atsea said don't be afraid to install all this manually. Regards, c4n
  7. c4n

    RegExp: Replace SRC attribute from <iframe>

    Hello both, Thanks for your valuable posts. Just a little issue with the last code posted, you probably didn't test it DRJ478 otherwise I am sure you would have figured it out. The above code replaces the test <iframe> to <iframe width="120" height="240" src="http://www.ask.com></iframe>...
  8. c4n

    RegExp: Replace SRC attribute from &lt;iframe&gt;

    Hi again Lrnmore, I found a little problem with this part of the RE: ([^src]*) This doesn't match "src" exactly. If you input a code like this: $test = <<<END <iframe scrolling="0" src="http://www.google.com"></iframe> END; it brakes on scrolling="" (note the "scr" which is not "src" but...
  9. c4n

    RegExp: Replace SRC attribute from &lt;iframe&gt;

    Hi, That does the job, many thanks. I made two small changes: 1. added i modifier to make the pattern case-insensitive. Now it also matches <IFRAME , <Iframe etc. 2. placed stripslashes() within the preg_replace() - this is to avoid the entire HTML code being put throug stripslashes() but...
  10. c4n

    RegExp: Replace SRC attribute from &lt;iframe&gt;

    Hello, I want to parse some HTML code with PHP and REPLACE the SRC attribute of a <iframe>. Example INPUT: <iframe marginwidth="0" src="http://www.yahoo.com" marginheight="0" width="120" height="240" scrolling="no" frameborder="0" ></iframe> OUTPUT should be for example: <iframe...
  11. c4n

    List all dates between a start and end date

    Wow, many thanks, this indeed is a simpler solution that my function :) Heh, I'm a self-taught programmer and while most of the time I get everything working I usually end up with a complicated function like the one above ;) Thanks again!
  12. c4n

    List all dates between a start and end date

    Hello all, I've decided to post this here as I always get great suggestions here :) So, I need a function that should return an array with all dates (Y-m-d) between two dates I input. For example if I input start at '2005-06-01' and end at '2005-06-16' it should return this array: Array (...
  13. c4n

    Help with regular expression

    Hi all, Thanks to all for posting this, much appreaciated. I will dig through your codes and I am sure I will learn new things abour RE. Thanks again! Regards, c4
  14. c4n

    Help with regular expression

    Hi Mark, Thanks for posting. Unfortunately I can't use that code because it isn't necessary the initial string ($str in your case) will be nicely formatted. It can be $str = <<<END some text1,some text2,some text3A{some text1,some text2,some text3} some text1,some text2,some text3B{some...
  15. c4n

    Help with regular expression

    Well, I got this combination of regexp and some other code working (at the end $a is what I want), but I was wondering if there is a more fancy way of doing it ;-) CODE: $a=" some text1,some text2,some text3 { some text1,some text2,some text3 } "...
  16. c4n

    Help with regular expression

    Hi all, I've been trying to figure this one out but can't seem to get it. Here's the situation: I have some text like this: some text1,some text2,some text3 { some text1,some text2,some text3 } What I want to do is add space after the comma (,) OUTSIDE the { } So the above text should...
  17. c4n

    setting up domain.com on local computer

    Thanks, I got it working. Regards
  18. c4n

    setting up domain.com on local computer

    Hello, When I type "www.mydomain.com" in my IE6 browser on Windows 98 I want the browser to open a local folder on my PC and not actually conect to www.mydomain.com For example I type "www.mydomain.com" in my browser and the browser should open C:\My documents\web\index.html instead of...
  19. c4n

    Detecting server OS

    Hello and sorry for the late reply. I didn't know about the PHP_OS thing, thanks! Looks nice, will test it on different servers and probably be able to use it. Thanks again! Regards c4n
  20. c4n

    Detecting server OS

    Hello, Thanks for the replies. I am using $_SERVER['SERVER_SOFTWARE'] at the moment, just thought I'd ask if there is a better way... If anyone knows any other way please let me know. Regards, c4n

Part and Inventory Search

Back
Top