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 Chriss Miller 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
  • Content: Threads
  • 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

    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...
  3. c4n

    RegExp: Replace SRC attribute from <iframe>

    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...
  4. 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 (...
  5. 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...
  6. 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...
  7. c4n

    Detecting server OS

    Hello, I need to detect server operating system within my PHP script, any ideas how to do it? I need to classify server in one of the following categories: - unix (linux) - windows - mac - other Any help apreachiated. Thanks, c4n
  8. c4n

    Two tables need help limiting by SUM

    Hello, I've got two tables: users --------- id | name --------- 1 | John 2 | Bob id ... unique ID number of the user name ... Name of the user and sales ----------------- id | user| amount ----------------- 1 | 1 | 10.00 2 | 2 | 13.00 3 | 1 | 9.40 4 | 1 | 20.15 id ...
  9. c4n

    Help with generating a JOIN query

    Hello, I need some help with a MySQL query, probably a JOIN. Here is the situation: I have two tables. The first one contains customer info. Table CUSTOMERS id | name | address id ... customer ID (MEDIUMINT, autoincrement) name ... customer name, for example John Doe address ... customer...
  10. c4n

    Mozilla Firefox problems with &quot;parent&quot;

    Hello, Here is the situation: I have a page with a form named "form1". It has a textarea in it, named "comments". <form name="form1" ...> <textarea name="comments" ...> ... </textarea> ... </form> Within the form I have a (javascript) link, that opens a new window named "smileys". Within...
  11. c4n

    New to joins, need help

    Hello, I'm new to table joins and would need some help with getting this SQL query right. I have two tables: 1. table clicks partnerid | date | raw | unique 2. table sales saleid | partnerid | date | amount Now let's say I want to find out how many clicks and sales are logged for partnerid...
  12. c4n

    Help with DISTINCT query

    Hello, I'm having some troubles with a DISTINCT query. Here is my problem: I have a table called "test" with collums "a", "b" and "c" and some different values (integers) in them. Example: a | b | c --------- 1 | 2 | 3 1 | 2 | 2 1 | 3 | 2 2 | 2 | 2 3 | 2 | 2 3 | 3 | 3 1 | 2 | 3 Notice that...
  13. c4n

    Script using too much resources

    I have this Perl script and my server admin said it is using WAY too much resources. Any suggestions on how to improve the script so it will run faster and better (uses MySQL database)? What this script does is count the number of impressions of a banner. So when it is called like this: <img...
  14. c4n

    Inserting header and footer in HTML

    Hello, This is what I am want to do and need your advice. I wrote a sort of a membership script (where users can login, view their statistics, edit their details etc.) and I want to be able to easily edit header and footer of the page. Not a hard thing to do, I know, but I fear that my...
  15. c4n

    How to create a security code?

    A lot of sites are using security codes to prevent automated signup (for instance paypal.com when you signup for a new account has one at the bottom). I'm sure you've seen it, it's an image with some characters and you must type correct characters in the input field in order to submit the form...
  16. c4n

    Filtering bad words

    I want to filter bad words from the input fields in a script. I came up with a code that works, but I'm sure one of you can give me a better solution (my code would probably take many server resources if the badword list is bad). Thanks for any suggestions! Perl code: #!/usr/bin/perl $input1...
  17. c4n

    Can't find a web page?

    I have a problem: my browser can't display a particular site (only one site, not many, so it's not the same issuea as in the &quot;Browser hijack by a virus, parasite, or ???&quot; post below). I e-mailed the webmaster and he said others haven't got any problems entering it (the URL doesn't...
  18. c4n

    Upload file to server WITHOUT using CGI.pm

    How can I upload a file to my server WITHOUT using CGI.pm module (UNIX server)? Because the ENCTYPE is set to &quot;multipart/form-data&quot; I can't (don't know how to) get variables from the HTTP POST otherwise then using CGI.pm. This is what I've been using so far, but it is important that...
  19. c4n

    Returning number of characters in a phrase

    How can I return the number of characters (including spaces) in a phrase the easiest/fastest way in Perl? Thanks
  20. c4n

    Perl + SQL question

    In my Perl script I use while ($h = $sth->fetchrow_hashref) { do this and that with $h->{colum1}, $h->{colum2} etc. } to print out the results of a SELECT statement. My question is how can I know (get the number of) how many results (rows) are returned before I begin the &quot;while&quot...

Part and Inventory Search

Back
Top