Jump to content

scliburn

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Everything posted by scliburn

  1. thanks peeps and thanks for the code example DW.
  2. Does php have any built in functions to perform an explode or string replace based on upper case characters: Example: AfghanistanTransnationalIssues I want to parse into Afghanistan Transnational Issues, without having to write some regex script. Anyone know if this exists, and if yes, what is the function name? I don't think it does, as I've been over the php site pretty good over the past 8 years or so.
  3. decided to go with getimagesize and if returns false, image doesn't exist.
  4. i've been able trust it. having 1.5 million entries in a table helps the rand() ideals.  ;)
  5. ans#1 actually opinion. Just unset it. It's sitting in memory otherwise. I aggregate data all day long, and resources are extremely valuable to me. If it's not hurting anything leave alone. If you have resource intensive scripts, unset it. I didn't realize it took any real processing time to unset a scalar.
  6. hmmm. here are a few more hacks that i can think of: #1 creating a new column for alternate company names. The secondary company name field, could have delimited values that you would have to parse prior to displaying.. its a hack but would work. #2 or create a separate table for company names and unique id's that are linked to the address table records. This would essentially give you the ability to add multiple company names for each known address. so you would have to query all company names from the company name table, and pull the associated address from the address table. In turn, you can now perform lookups on the company table for each of the names. You could also keep the company name in the address table and refer to it as the primary? Just throwing random ideas at ya.
  7. $output['0'] = "<tag>the good stuff</tag>" but $output['1'] = "the good stuff" output is now an array.
  8. yes, I am aware of the quote. it's posted for all to see. Thank you. Yes you are correct, i stated initially [quote]url wrappers is not available[/quote]. My mistake. url wrappers is [b]open[/b] but not available for this [quote]version independent[/quote] function file_exists(). [quote] Tip: As of PHP 5.0.0 this function can also be used with some URL wrappers. Refer to Appendix M for a listing of which wrappers support stat() family of functionality. [/quote] However the post is titled: [quote]checking if a [b]file exists[/b] via http using 4.3.9 [/quote] wildteen88 can you think of an alternative? thank you for response.
  9. thanks wildteen88, i did not read his post thoroughly regarding the exact error. could he not during the loop add more time to the execution of the script? set_time_limit (30); Not that i would recommend this action if the script is not written proficiently.
  10. I would double check that the password is in md5 format. Maybe on the side, copy out the password, and then take what you know to be the password before it's md5 mangled and then md5 it and see if they match. That would be the only thing i can think would be your recourse. hope it all works out.
  11. url wrappers is open, however file_exists (to my understanding) won't be able to use this until php5. did you have a suggestion?
  12. it could be that the global variables ini setting is off. You would need to call to the [code]$_POST['variables'][/code] variables instead.
  13. are you storing the password in mysql as md5? This could be why you are receiving the error. You really should only create a SESSION variable once the DB record is matched. (my preference. good luck)
  14. um, try LIMIT 2 calling to the initial offset may give you a hassle. KISS - [b]K[/b]eep [b]I[/b]t [b]S[/b]imple and [b]S[/b]tupid. ;D
  15. [code] $pattern = preg_match('/('. $search .')/', $stringtolookin, $resultingarrayofmatches); you can then use the resulting array ($resultingarrayofmatches) of matches in anyway you would like. [/code]
  16. have you thought of creating a new column that can link the 2? Like creating a parent to child relationship? Maybe creating a field with a true client ID that is present on both records. I imagine you have some type of record id (incrementing) that you use. Having another field would then allow you to link many sub-companies in this manner eh. hope this give some insight or inspiration.
  17. i would think you could use google tool bar? lmao. If the site only allows posts from it's localhost, then the following wouldn't be possible: create your own form, host it, and post to the proper url. Alot of spammers do this with contact form submissions. if the form does not call to "values" in it's html, then it may be impossible. If the form does call to a value (try submitting the form but leave off some required data) then you can easily place your values into a GET string form.html?name=john&city=los%20angeles&ad=youraddstuffhere. just some suggestions. Not that I'm promoting working around anyone's protocol for form submissions...  ;)
  18. there are a couple ways to suppress an error. place the "@" in front of a call for one. setting error_reporting(0); at the top of your pages, or possibly writing some simple code to perform checks on connections and false hoods.
  19. i personal prefer using the ftp_put command when working with a clients site. This allows me to control access to their account with having to use the server's tmp directories for the initial storage of the file.
  20. yes of course. inside a conditional statement, you can have other conditional statements. You can also consider using the "switch" statement for your initial conditional statement.
  21. are you calling to localhost as the hostname? also, what OS are you on?
  22. since the url wrappers is not available, does anyone have any solid suggestions. This seems to be escaping me. Any function that would return a true or false for some of boolean code would be awesome. the file will be a jpg 100% of the time.
  23. thanks Sem' I was hoping for that answer.
  24. when you attempt to run a php script that contains ftp_get from a browser window, does the ftp_get command run as client? Meaning, is it going to try and get the file for your local machine, or will it attempt to save the file onto the server. Just checking.
  25. yes this is a PHP question. I am writing a small script to download files that all have the same initial characters in their name. Instead of having to run through a function on specific files names i want to grab all files that start with xyz*
×
×
  • 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.