Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. ah okay cool
  2. oh okay well then that's not how I understood it. you said: that led me to believe you wanted "and" instead of "and and and" $str="php and and and perl"; $replace=preg_replace("/and/","",$str); echo $replace;
  3. if you ran the code as I posted it, the output is: "php and perl" that is what you want, right?
  4. umm...that's because you are replacing "and" with "and" lol.
  5. well, I suck at regex, but here's my take: <?php $str="php and and and perl"; preg_match_all('/and/',$str,$count); $limit = count($count[0]) - 1; $replace=preg_replace("/and/","",$str,$limit); echo $replace; ?>
  6. you store the data that makes up the picture as a string. Well in reality, you'd be storing it as type blob. Then you retrieve that string and make a loop to build it back up, pixel by pixel. edit: or well, I guess you could store it as a file. I mean, if you make a blob or longblob type column and use the target file as the value, that should work, too.
  7. if you have access to your cpanel you should be able to deal with hotlinking from there. an alternative is to store your pictures in a database and have a script retrieve the info and use the gd library to create and post a picture on the fly.
  8. should if(isset($_POST['text'])) be if(isset($_POST['shoutext'])) ?
  9. insert is for adding a new row. update is for editing an existing row.
  10. well $tags is a 3d array so in your foreach ($tags as $category) {...} $category is an array also and you're trying to use an array as an element position.
  11. yeah that is what he meant but I was talking about alternatives to gd. I know it doesn't make a physically smaller pic but display-wise, it can be shown as thumbnail sized that way.
  12. yeah i guesso...if you're using extremely long variable names...but if you're at that point then imo you probably need to look into namespaces or at least using better names... I'll concede to less quotes but you can completely code without having to escape quotes if you make use of single quotes inside double quotes and use { }'s around your vars as necessary. imo that's much cleaner and conforms more to coding standards. I put that in the same class as not using quotes around attributes in html. it "technically" works but is not the standard. bottom line is imo printf and sprintf promotes laziness. p.s.- gratz on 2k
  13. I really don't see the value of those functions. You have a huge block of code with multiple references to a variable and what..seriously, nothin' ctrl+f and replace couldn't handle. I think it makes coding less readable. I mean, to me, it like, takes away the point of naming variables something meaningful. IMO.
  14. well you could always ask your host to install it. frankly I'm kinda surprised they don't have it, but w/e. Failing that, you can specify dims with html tags or w/e.
  15. yay more ungrateful people getting rude with people willing to offer free help when they can charge a buttload of money instead. QQ MOAR
  16. yeah but escaping quotes is ugly like my ex-girlfriend's sister ugly.
  17. Yeah there's no way that script in and of itself could be the problem. I think you should ask them to be more specific. It's possibly someone(s) could be targeting your script with a bot, requesting it over and over, or some other kind of DNS attack.
  18. print "<a href='moreinfo.php?title=$ID' class='results'>";
  19. ah okay. gd
  20. I don't get it. First you say but then you say so...first you say you got it, then you say you don't...so which is it?
  21. yes, but unless you break out of the loop, php will not stop the loop until the condition is false. And you can't restart it after you break out of it. edit to add: hold up. Are you calling a function inside the loop? You would need to declare a variable as global or else pass it as an argument to the function or else it is outside the function's scope.
  22. lol why not? there's plenty of "free legal advice" type places on the internet.
  23. well I suggest you check out your current site's stats. Look at how much diskspace you are using and the rate at which it is growing, how much bandwidth on average your site uses, etc.. I really don't know what kind of server access invisionfree offers but you may have some kind of cpanel with an awestats type program to give you info like that, or maybe you can contact them and ask. But you should probably look at those numbers to figure out what package best suits you.
  24. well I can't recommend anything because I have no idea what kind of website you're wanting to do, how many visitors you plan on having, content, etc.. I'm not psychic, lol.
  25. well unless your host is a dedicated server where they give you the access and you're responsible for installing stuff like apache, they should already have that stuff on there. but no, if you are using a host, you do not need apache or anything else on your computer.
×
×
  • 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.