I spent a few minutes about an hour ago trying to fix up my news script. The problem, as mentioned before, was with formatting characters like quotation marks and apostrophes. Basically, I want all apostrphes escaped, but only some quotation marks escaped. I searched on the net (a long time ago) and found the htmlspecialchars() function. This escapes apostrophes, quotation marks, ampersands, and greater and less than symbols. I don’t know why I thought this solution was good, but I did.
In reality, the htmlspecialchars() function did not fit my needs at all (except for processing comments), especially given that I did not want ampersands and greater and less than symbols escaped. This was causing a lot of problems with any html I was using in posts. I realized the problem and thought long and hard for a solution, coming up with nothing until now.
The solution I just came up with was to ditch the htmlspecialchars() function. I can just escape the apostrophes using the str_replace() function and use the element to denote quotations. Any other quotation marks I want escaped will just have to be escaped manually, which should not be very difficult (or time–consuming).
What I don’t understand is why it took me so long to come up with this solution. Originally, I included the htmlspecialchars() statement in a function with some str_replace() statements, so it’s not as though I was unaware of the replace statement. For some reason, I guess that I thought punctuation could only be escaped one way.
I just got off the phone with my ex−girlfriend. She was making annoying noises somehow (I assume she was hitting keys on her cell phone while I was on speakerphone). Said noises grew increasingly annoying and I, at first, just put the phone down. I still heard them even while the phone was lying on the ground, so I closed the phone, thereby disconnecting the call.
This all made me think. How are we driven to hang up the phone. Usually one uses a phone because one is not in a position to talk in person to the person on the receiving end. So, if the phone is taken out of the equation, thus ends possible all forms of instantaneous conversation (for a second let’s go back a few years to the point when you didn’t just IM someone you couldn’t get a hold of). Of course, the other person could just call you back, but often times that person would just feel shamed for giving in. and you are not going to call the other person back - afterall, you just hung up on them.
So why do we hang up on others? If we cared, would we just skip ending the conversation and just say the equivalent of, That’s it, this is over
? I don’t think so. We must be pretty mad to enter into the possibility of never speaking (or not speaking for a prolonged period) to the individual on the other end.
Or maybe we don’t think this way. He’ll call me back,
we say. Do we really know this? I think so. But, what if one knew that he would never speak to the person on the other end if he hang up right there? I don’t think he would hang up—unless he had repeatedly seriously considered hanging up.
It’s an enigma.
Today I turned 18 years old…
So what did I do on my eighteenth birthday? Yes, you guessed correctly, I bought $1500 worth of stock. Since my graduation (before actually, but the plan was not too realistic then) I’ve wanted to buy stock. Unfortunately, one must be 18 to buy stock, and I was 17 back then. So I waited, all the while planning out which stock I should buy. I decided on SanDisk (SNDK), Electronic Arts (ERTS), and Take-Two Interactive (TTWO). All three were falling fairly consistently and nearing their lowest valleys in quite some time, so they seemed like good choices.
Since last night after midnight was technically July 24, I tried signing up at e*trade. However, I could not sign up at the site, even after midnight. So I did some more research about online brokers and decided TD Ameritrade was probably a better choice. Luckily, I was able to sign up at said site after 1:00 am. However, after completing the sign-up process, I found out my account was frozen, as identity checks are performed on every new account and I have no identity (well, at the time I didn’t). Another setback.
I set my alarms for 8:00 am but ignored them anyways. So around 10:00 am I called my mom asking her about the information need by TD Ameritrade. I rode my bike to OfficeMax and faxed the necessary information.
Once I got home from the Max, I started my trading adventure. I purchased some shares of ERTS and SNDK. Then came the time for TTWO. Apparently, TD Ameritrade requires paying a special margin to buy TTWO stock. I have no idea what a margin is, so i decided to buy a different stock, one not affected by such margin. I remembered that a friend who knows a lot about stock trading has some Toyota (TM) shares, so I bought some of those.
The rest of the tarding involved watching the stock prices. Luckily, today was a great day for the stocks I bought (and most other stocks) so I made a profit of $23 (ignoring the $40 that went to TD Ameritrade as commissions). I can’t wait to see how my stock does tomorrow!
Later on today I played baseball. I couldnt hit the ball but made a leaping catch in the outfield and tagged someone out as home as the catcher. We lost by one run. Now I am going to eat some chicken wings and watch episodes of The Simpsons.
If you visited the site in the past few days and checked the home page, you would have seen a wealth of comments. Assuming you did not check any of the comments, you would have thought that icorey dot com is finally getting some traffic along with some visitor feedback. If you did check the comments, then you know that the comments were just spam, posted by robots.
This is a problem. All of these spam-filled comments make my site look retared, especially when they contain links to site that do not exist (or are retarded, but in a way different from mine). Since this problem is so vast, I would like to kill the internet, but that solution is a double-edged sword: if I kill the internet, I take down not only the robots, but myself as well.
So I need some other solution. I tried using some code in the original comment script that would make a cookie that lasted for only a short time. If the cookie was there, the user could not post. Alas, this script did not work. I don’t know why, but it did not work.
There are other ideas, however. I could go on the internet (the same internet I once wished to kill) and try to find out why the cookie code I had did not work. This method would most likely involve just fixing my own code. The other solution is to make script that has own of those distorted images and the user must enter the text in that image. These are a pain but would probably be more effective. Nevertheless, there’s a problem with this solution. I have no clue whatsoever about how I would make a script like this. So, I would have to just use a script written by someone else. This would go against the theme of ICOREY PHP News, in that I wrote the whole thing by myself. However, since a solution is necessary, I may have to set my pride aside and use a script online.
The last few days have been action-packed and filled with adventure and sweat. Monday was uneventful as my baseball game was cancelled. Tuesday was the first action-packed day in this trilogy of excitement. On Tuesday I got up early to take a trip to Citizens Bank to set up a checking account. Now, I don’t plan on writing a ton of checks; I want an account so I can transfer money to an account at a place like e*trade in order to buy some stock. So, I went to the bank and ended up getting a checking account with a very small amount of funds in it and a savings account with most of my money tucked in it. I’m happy with this decision as interest will grow on most of the money but if I need to buy something in college (like books) I can transfer money to the checking account online.
Later on that day I had my third driving lesson. I screwed up on three-point turns somehow and I also botched some parallel parks. Parallel parcking is tough. Afterward, I helped my mom plant our large stash of flowers in the front yard, so that task is finally done. In the process of planting, I forgot about my roller hockey practice. However, this is okay, as those practices are pointless.
Today I also awoke very early. The impetus for that action was my 5-hour course. It was a blatant waste of time. I’m also very surprised that my driver lesson instructor entertained so many weird answers. I was hoping for some sort of a lecture.
The next event today was writing my first check. It was for a sum of ten dollars, which is going to America’s Fair to cove the entry fee for the junior photo contest (this is, I believe, my last year in the junior section). This year I’m entering four photos, one in each of the following categories: portrait, flower study, animal, unique. I’m worried about the animal photo as it will be one of Vicki riding Corky. Given that it’s the animal section, the focus should probably be the animal; however, the animal section is also for "figures," so such a photo might work.
Tonight I played roller hockey for two hours with a bunch of people older than me. It was exhausting (hence the title) as it was on an ice hockey rink (with tiles) and we used a puck, which as it turns out, is much different than using a ball.
Tomorrow I have another lesson and then work. Hopefully I do well at both things.
Note: these sites may have broken links.
The Free Encyclopedia)
webcomic)