Search found 41 matches
- Wed Jul 08, 2009 7:21 am
- Forum: PHP - Code
- Topic: Find and replace substr outside HTML tags only
- Replies: 6
- Views: 331
Re: Find and replace substr outside HTML tags only
Yeah, that won't work...
- Wed Jul 08, 2009 5:52 am
- Forum: PHP - Code
- Topic: Find and replace substr outside HTML tags only
- Replies: 6
- Views: 331
Re: Find and replace substr outside HTML tags only
Here's an example: You're misunderstanding me, or I'm misunderstanding you <img src='misunderstanding.gif'> @hilite = "misunderstanding" I want: You're <span class="hilite">misunderstanding</span> me, or I'm <span class="hilite">misunderstanding</span> you <img src=&quo...
- Wed Jul 08, 2009 5:37 am
- Forum: PHP - Code
- Topic: Find and replace substr outside HTML tags only
- Replies: 6
- Views: 331
Re: Find and replace substr outside HTML tags only
You're misunderstanding me, or I'm misunderstanding you
I'm having a hard to figuring out how to do that only in text nodes of the HTML, not inside tags. For instance if I want to hilite the word "img" I do not want it to replace all the image tags.
- Wed Jul 08, 2009 5:31 am
- Forum: PHP - Code
- Topic: Find and replace substr outside HTML tags only
- Replies: 6
- Views: 331
Find and replace substr outside HTML tags only
I'm trying to highlight certain keywords in an HTML string. The general approach is to replace [substr] with <span class="hilite">[substr]</span>. However I'm having a hard to figuring out how to do that only in text nodes of the HTML, not inside tags. For instance if I want to hilite the ...
- Sun Jun 08, 2008 11:07 pm
- Forum: PHP - Code
- Topic: HELP : this code work in localhost but not in my web page
- Replies: 4
- Views: 673
Re: HELP : this code work in localhost but not in my web page
Sorry to dig up this ancient thread, but I was searching for a way to highlight words in an HTML page and came across this. After some tinkering I came to the conclusion that all you really need is this: // $terms is an array of words to highlight, so you can highlight more than one word // $body ...
- Sat Dec 15, 2007 4:49 pm
- Forum: PHP - Code
- Topic: Event based email reminder
- Replies: 8
- Views: 866
Well, assuming it was simple to control cron jobs from PHP, I wouldn't consider it being more complicated, rather done correctly and efficiently. However, based on my research, it doesn't look like it's an option. So I guess running a cron job every minute or so sounds like my final answer. Thanks a...
- Fri Dec 14, 2007 6:32 pm
- Forum: PHP - Code
- Topic: Event based email reminder
- Replies: 8
- Views: 866
Yes, cron job looks what I need, thanks. Now the question is, can I start cron jobs via a PHP script? In this way I would like to do something like this: 1) Master cron job runs every 24 hours, and calls PHP script eventSchedule.php 2) eventSchedule.php does a database lookup for all events that day...
- Thu Dec 13, 2007 10:58 pm
- Forum: PHP - Code
- Topic: Event based email reminder
- Replies: 8
- Views: 866
Event based email reminder
How would I go about making a system that sends automatic event based email reminders? My situation is a weekly online meeting, and I want to automatically send out an email reminder to all registered emails an hour before the event starts. I could make a PHP script which allows me to manually hit i...
- Sat Dec 01, 2007 7:21 pm
- Forum: PHP - Code
- Topic: htmlentities() giving strange results...
- Replies: 2
- Views: 457
- Sat Dec 01, 2007 7:11 pm
- Forum: PHP - Code
- Topic: htmlentities() giving strange results...
- Replies: 2
- Views: 457
htmlentities() giving strange results...
I'm trying to use the htmlentities() function but finding that many characters get very strange results. For instance, the character « does not get converted to simply « , but rather « . Some characters after conversion are even worse -- for instance, the character ‹ c...
- Wed Nov 21, 2007 10:44 pm
- Forum: PHP - Code
- Topic: Check existence of email address?
- Replies: 15
- Views: 3210
Anything short of that may be a good indicator, but that's all. That's exactly what I'm lookin' for, homie: a good indication of the existence of an email address without sending an email confirmation. At any rate, I found what I was looking for: http://us2.php.net/fsockopen If you scroll down near...
- Wed Nov 21, 2007 6:34 pm
- Forum: PHP - Code
- Topic: Check existence of email address?
- Replies: 15
- Views: 3210
Thanks phpBuddy, However, if I follow correctly, that is only checking to make sure the domain exists and if it is a mail server. That's a good step, but what I actually want to do is go one step further and attempt to verify the existence of a specific email with that server. I am on a Unix box, btw.
- Wed Nov 21, 2007 5:04 pm
- Forum: PHP - Code
- Topic: Check existence of email address?
- Replies: 15
- Views: 3210
Maybe I didn't explain it correctly or else I don't understand what you are implying: 1) I do not want to send an email at all. I want to determine if an email address is a real address. 2) I know how to send an email, but I don't know how to determine if the server rejected or accepted the email --...
- Wed Nov 21, 2007 3:37 pm
- Forum: PHP - Code
- Topic: Check existence of email address?
- Replies: 15
- Views: 3210
Check existence of email address?
I'm wondering how I might go about checking to see if a user supplied email address exists. In other words, I've already checked to make sure it's a valid email address, now I want to go a step further and attempt to verify the email address' existence with the supplied domain. For instance, the use...
- Tue Mar 06, 2007 9:30 pm
- Forum: PHP - Code
- Topic: Easiest way to fetch filename
- Replies: 4
- Views: 641