Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. http://www.zip-codes.com/ Found using google, "zipcodes and state list". Edit: Added the "free" keyword and found: http://wareseeker.com/free-list-of-us-zip-codes-united-states/
  2. No truer words have been said. My little girl, who is 3 months, is starting to go to bed at 8:00pm and waking up at 5:00am to eat then she will go back to sleep till 7, when she is up for good I like that routine, I just hope it sticks!
  3. VARCHAR length limit is 65,535 since MySQL 5.0.3 Wow, I am way behind the times...lol on my dev box I still run mysql 3.x :X granted I havnt really coded any projects for a while, I guess having the subquery feature in MySQL will be nice, time for an upgrade I guess and to read up on MySQL 5.x
  4. MySQL can handle that no problem. That is actually a very small amount of data. You have no worries
  5. header.php <html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title><?php echo EMS_CAD; ?></title> <link rel="stylesheet" href="style.css" type="text/css" media="screen" /> <?php if (function_exists("add_to_head")) { echo add_to_head(); } ?> </head> Try that. You only need to open PHP tags when you plan on executing PHP code. Also: index.php <?php add_to_head("<link rel='stylesheet' href='blue.css' type='text/css' media='screen' />");?> You had a syntax error with the double quote after blue.css.
  6. Shhh this is top secret, heaven forbid they found out about her =\ EDIT: On a side note, that reminds me. I need to get a v1.0 shirt for me and a v2.0 for her
  7. I bet she will, as she will be programmed with AI and has a feature to accept and interpret all kinds of input and learn from that input. "Need Input"
  8. VarChar would be correct type. If the string can go past 255, then text would probably be the preferred method.
  9. Yea, damn that SQL injection =\
  10. lol "Dad, Select candy from store where type = 'cookies' and type = 'bars';" "Sorry honey, No Rows Returned".
  11. I already told my wife we are starting a family business we need at least 2 more kids so I have 3 programmers on staff She didn't think that was a good idea, but yea. She already helps me code sometimes, smashing the key board and erasing half my stuff is sooo helpful!
  12. You will need to first grab the contents of the website, curl or file_get_contents will be your primary source to figure that out. Second use the method Alex provided to search the retrieved string data for that string you want and viola, you have it.
  13. It can be as of 4.2 they added that ability, but the how the OP was using it is incorrect. The original array would need to be multi-dimensional and the array needle would need to match an array inside the multi-dimm array being searched exactly, as far as I know But yea, see Mad's response for the solution. EDIT: An alternative to doing the in_array would possibly doing an array_search, depending on what the OP is looking to get out of this.
  14. My bet is the configuration settings in php 5. The old version of PHP could have had a different include path that the new one does not have, either it was defaulted in the older version of PHP or was added manually. Alternatively, I could be completely wrong and they just changed how __FILE__ worked and it now works so that it actually includes the file instead of the directory as it previously did? The only way to get to the bottom is go look at release notes on php.net
  15. I think he explained it well for how you explained it. If that is not right, post 2 real examples that you would use so we can better understand what you want to be achieved. Given the original topic, Alex answered you question perfectly. Doing a better explanation with examples of what you want exactly will help you get the answer you want.
  16. Having a kid was the single most happiest day of my entire life. I would never trade that feeling for anything. I love having my little girl to share my life with now. I feel sorry for you for feeling that way, as the joy a child of your own can bring to you is nothing short of a miracle.
  17. Sorry, missed that part of the code It was fine where it was, as far as why it is outputting the binary and not the actual image....hmmm not sure, looking at imagejpeg what you are doing seems correct. Maybe try to output buffer the contents instead? <?php $myImage=ImageCreate(150,150); $black=ImageColorAllocate($myImage, 0, 0, 0); $white=ImageColorAllocate($myImage, 255, 255, 255); $red=ImageColorAllocate($myImage, 255, 0, 0); $green=ImageColorAllocate($myImage, 0, 255, 0); $blue=ImageColorAllocate($myImage, 0, 0, 255); ImageRectangle($myImage, 15, 15, 55, 85, $red); ImageRectangle($myImage, 55, 85, 125, 135, $white); header ("Content-type: image/jpeg"); ob_start(); ImageJpeg($myImage); $image = ob_get_contents(); ob_end_clean(); echo $image; ImageDestroy($myImage); ?> I highly doubt that it will work, but worth a shot...
  18. Well I have been gone for a few months the wife and I had a kid and man that keeps you busy! Anyhow, gonna try and be a bit more active but given the holidays I will probably have my "spurts". Anyhow yea Excited to be back and able to contribute again!
  19. Try this instead: echo "<a href='http://google.com'><img src='{$row['photo']}' /></a>"; See if that improves it all
  20. You want the reason, because after you iterate it up passed 0 and 1 it replaces 2 which there are "2"'s that are inside the tags, the flaw is that there are tags in the code and of course if a tag is created within a tag it will cause issues: <font face="Verdana" color="red" size="<font face="Verdana" color="red" size="2">2</font>">0</font> Notice how it is replacing the 2 inside the <font> tag, which of course will cause display issues. The code I provided works, it is just that since the code replaced has a 2 in it, causes a little issue that anything replaced before that will be replaced. A better method of doing this, use a CSS style so you do not get this error. <style type="text/css"> .redColor { color: red; font-size: 15px; font-family: Verdana; } </style> <?php $i=0; $upper = 60; while ($i <= $upper) { $FGuide = str_replace($i, '<font style="redColor">' . $i . '</font>', $FGuide); $i++; } ?> Will solve that problem. EDIT: I should have caught that ahead of time, sorry for that.
  21. Most of the time it is just people probing seeing if they can get something to work to exploit your code, what they were trying to accomplish we have no clue...you will have to track down the user by the IP and ask them in person or lookup adding an array to get data and see what type of exploits come out of it.
  22. Hmm that gives me a TON of information to help you out....if it is not working either: A. You omitted a good chunk of code, post that here so it can be tailored a bit more. B. See A.
  23. They probably are using access to a whois database that constantly updates locally. This way all the data is local and updates itself...they also probably pay a pretty good penny for that kind of access to a database or run their own servers to constantly update etc and those servers are dedicated to just that. My 2cents anyhow.
  24. $i=0; $upper = 60; while ($i <= $upper) { $Fguide = str_replace($i, '<font face="Verdana" color="red" size="2">' . $i . '</font>', $Fguide); $i++; } A simple while loop does wonders for ya
  25. You will have to setup a "config" to say for each site1 etc. Then before including header.php include that config.php which contains constants or variables, such as "SITE" IE: http://localhost/site1/config.php define("SITE", "site1"); http://localhost/site1/index.php <?php require('config.php'); require('../header.php'); ?> http://localhost/header.php <base href="http://localhost/<?php echo SITE; ?>/" /> <link href="style.css" type="text/css" /> Catch the drift? You will have to define it somehow, or else the script is just like anything else, it does not know how to decide what "you" want.
×
×
  • 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.