Jim Lucas wrote:
If you are running Apache, you do realize that all of this can be done
in Apache instead of PHP right?
.htaccess example:
# Power-up the rewrite engine:
RewriteEngine on
# Redirect all non-www traffic:
RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
RewriteRule ^/?(.*)$
Looks like you are missing a comma on line 3.
James Lockie wrote:
I get a syntax error on strlen.
$newTypes = array();
$newTypes[0] = array();
$newTypes[0][0] = Starting with
$newTypes[0][1] = strlen( $newTypes[0][0] );
--
Wishlists: http://snipurl.com/1gqpj
Switch:
Micky Hulse wrote:
Looks like you are missing a comma on line 3.
Doi, meant semi-colon, not comma... Lol.
Also, when I get PHP errors, if not obvious, I check the previous line
also... If says something like error on line 7 I will look at both
line six and seven.
Of course, depends
Hi,
I am trying to describe why php short tags failed to work on a server...
here is my simplified explanation:
it had to do with the server settings... The short_open_tag directive
in php.ini was set to 0.
Do you think that is an ok way to describe the problem to a technically
literate
Hi Chris, thanks for the quick reply. I appreciate your help.
Chris wrote:
Sure.
Thanks. :)
1 3 definitely. No idea how it's a security risk.
Ah, great. Thanks for clarification.
I probably mis-read the info about it being a security risk.
Have a great day,
Cheers,
Micky
--
Wishlists:
Hey Richard, thanks for the reply. I appreciate it. :)
Richard Lynch wrote:
http://php.net/
Yikes! I guess it was one of those RTFM question/answers! Lol. :D
#2 sounds awfully bogus to me...
Yeah... Hmm, now I am starting to wonder where I heard/read that. Maybe
it was a co-worker. I am
Congrats Tedd! :)
Cheers,
Micky
--
Wishlists: http://snipurl.com/1gqpj
Switch: http://browsehappy.com/
BCC?: http://snipurl.com/w6f8
My: http://del.icio.us/mhulse
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tom Ray [Lists] wrote:
Well I think my only issue with it is that this is a group discussion
...snip...
to the list by default.
I agree with Tom.
I ussually hit reply, and take a few seconds to delete all the emails
except the list email -- not very hard. :)
--
Wishlists:
I use and love http://www.namecheap.com/
8.88$, plus whois guard.
The control panel is great. Fast customer service.
Also, I personally would avoid mixing host and registrar.
Cheers,
M
--
Wishlists: http://snipurl.com/1gqpj
Switch: http://browsehappy.com/
BCC?:
Augusto Morais wrote:
I want create a variable based in another variable. Example:
Maybe this will give you some ideas?:
http://us3.php.net/manual/en/language.variables.variable.php
Good luck!
Cheers,
Micky
--
Wishlists: http://snipurl.com/1gqpj
Switch: http://browsehappy.com/
BCC?:
tedd wrote:
You make a great points.
As the old lady said, as she kissed the cow To each their own. :-)
Sounds good to me. Like you said, things like this are very interesting.
Nice site btw. I really like the simplicity of the logo, and very cool
idea to make the tree change with the
Hi,
Hopefully this is not a completely stupid question, but... Any
alternatives to using HTML comments in an XHTML 1.0 Strict docutment?
For example, I could do this:
XHTML
XHTML
XHTML
?=# Comment goes here.?
XHTML
XHTML
XHTML
That might work for some situations...
Any other alternatives?
Micky Hulse wrote:
Any other alternatives? I would like to find a way of adding comments to
an XHTML PHP page that is quick and easy.
Ah, nevermind... I should have never posted this question.
This solved my problem (IE duplicate char bug):
!--[if !IE]Put your commentary in here...![endif
Hi,
Recently, a client of mine was getting a ton of spam email from a site
called hotbox.com. I updated her form to one with more spam security,
but she is still receiving junk email.
Anyone feel like sharing code snippets that will help beef-up spam
protection for a contact script?
Do
Quick note to Kevin Waterson:
Hehe, I think all this talk about spam sent my response to your reply
into your spam filter... I got a bounce back. Thanks for help though...
let me know if there is any way I can re-send the email without a
bounce-back.
Richard Lynch wrote:
If you are not
Micky Hulse wrote:
Recently, a client of mine was getting a ton of spam email from a site
called hotbox.com. I updated her form to one with more spam security,
but she is still receiving junk email.
Hi all, thanks for the great responses (on/off list). I just realized
that the spammer
Micky Hulse wrote:
I just commented-out all of the PHP in the old script and added one
line: die(#%$#@ off!);
Actually... is there anything more I can do at this point to fight back?
Can I use something better than die()? Or, is it best just to let them
figure it out and go away?
--
PHP
Ack, your email provider thinks my email is spam... not sure why. I got
a bounce-back with this link:
Permanent Failure: 553_5.3.0_[EMAIL PROTECTED]'s
domain].net..._REJECT:550_Spam_filter_activated_see_http://[kevin's
domain].net/spam/
Sorry to hit the PHP list, but I really wanted to
Richard Lynch wrote:
You can tie up their connection, wasting your connection...
If it were my own site, I might think about doing something like wasting
my connection...
I suppose you could do:
header(Location: 127.0.0.1);
and then they'd be trying to surf to their own computer, if they
Richard Lynch wrote:
I rolled my own, because I thought it would be a useful learning
experience.
Sounds like what I am thinking. :)
And, I kinda sorta documented it.
Well, I put the source up on-line anyway. :-)
So here's one crude hack way to do it, if you just want the basics of
how it's
b4nl($foo);
Could not find info on php.net maybe I did not look hard enough.
Tia,
Cheers,
Micky
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Chris.
Chris wrote:
It's not a php function.
Assuming you're on *nix or *bsd, you can grep your source code for it:
grep -ilr 'function b4nl' *
Your text editor may also have a search function that will do something
similar.
Ahhh... strange. I think I have seen a few PHP scripts that use
Hi,
It is getting late, and I do not think I am thinking clearly...
What would be the best way to wrap em/em tag around the first letter
of a string?
I know it has to be a combination of str_replace() and substr(), but due
to my level of sleepiness I am having a lot of trouble working this
Yeah, I do need sleep...
Thanks guys for the posts... exactly what I was looking for.
Oh, and I did come-up with something similar right after posting:
if($configs['access_key'] === true) {
$pages[$i][0] = substr_replace($pages[$i][0],
'em'.$pages[$i][0]{0}.'/em', 0, 1);
}
Thanks again to
Stut wrote:
I could be mistaken, but I seem to remember reading somewhere that using
that syntax to access characters in a string has been removed from PHP6.
I suggest you use $string[0] instead.
(Yes, I am sleep-typing!)
Hi Stut,
Ah, thanks for bringing that up...
Changing this:
Thanks to you folks, this works even better:
if($configs['access_key'] === true) {
foreach($pages as $key = $string) {
$pages[$key][0] = 'em'.$string[0][0].'/em'.substr($string[0], 1);
}
}
Many thanks, :)
... Now I can sleep. :D
Cheers,
Micky
--
PHP General Mailing List
tedd wrote:
Not meaning to wake you, but you might consider removing markup from
presentation via css. If so, checkout:
http://www.w3schools.com/css/css_pseudo_elements.asp
Ah, good point! Lol. Looking into that now... all I want is basic
access-key support/styling.
Thanks for the tip. :)
Hi,
I am looking for the most secure/efficient way to compare these two strings:
/folder1/folder2/folder3/folder4/
/folder1/folder2/folder3/folder4/file.php
Basically I am trying to setup as many security features as possible for
a simplistic (home-grown/hand-coded) CMS...
This appears to
Stut wrote:
First of all make sure you are sending both strings through realpath
(http://php.net/realpath) to remove any symbolic links and relative
references. Then you can compare the two strings. The way you're doing
it will work but it's probably not very efficient. This is what I use...
Wow, thanks for all the great information folks (Stut, Ivo, Rob, and David.)
I really appreciate all of the top-notch advice and expert information. :D
Looks like I have a lot to think about...
Currently, I hard-code the paths to the folders that house the files I
want my CMS to edit (via a
Hi Robert,
Robert Cummings wrote:
How are these saved files then imported into the content? Are they
included or do you retrieve the contents using something like file(),
file_get_contents(), or fread() and then echo it? If you are using
Currently I am using readfile() (plus some other
Robert Cummings wrote:
Readfile works great, it's the same as file_get_contents() and then
Ah, good to hear. :D
issuing an echo. You may want to also stored content generated by web
users outside of the web tree. There may not be any issue with how you
[...]
with PHP tags and accesses it
Ivo F.A.C. Fokkema wrote:
Ah, thanks. Misunderstood the question, then. Thought just checking if
it's a file in that directory was what's needed.
You were right. :)
I did not plan on looking-in anything other than one or two hard-coded
folder locations. But, it is good to know the details.
tedd wrote:
http://xn--ovg.com/pframes
Whoa, nice work Tedd! :)
Very cool. Gives me some fun ideas... thanks for sharing.
Cheers,
Micky
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I am slowly learning how to use classes properly... quick question:
# Create the object:
$doSplash = new RandomSplash(); // Create the object.
Shouldn't I be able to call that object like below, throughout my page:
...HTML...
?php $doSplash-randomize('css'); ?
...HTML...
?php
Micky Hulse wrote:
Any help, even a RTFM link, would be really appreciated. :)
Hi all,
A fellow list member gave answered my question off-list and pointed me here:
http://www.php.net/oop
Going to (re)read... It has been a while since I last worked with
classes. :)
I asked because I
Christopher Weldon wrote:
What's the error, and how do you have the class and functions defined?
Hi Christopher, thanks for asking. :)
Actually, it was one of those silly, right in front of my face, logic
errors...
class RandomSplash {
var $alphabet = array('a', 'b', 'c', 'd', 'e', 'f',
?=$_SERVER['PHP_SELF']?
Can I replace the above with some sort of XMLHTTP request?
Googling now... thought I would ask here first.
Any good links to tuts that might cover that sort of thing?
Kinda thinking about plugging some Ajax into a random image php script.
TIA. :)
Cheers,
Micky
--
Hi all, thanks for responses, I appreciate it. :)
Miguel Guirao wrote:
What do you exactly want to do?
Oh, I wanted to call a php function on my page that changes some CSS. I
was hoping I could change my CSS on the fly without having to reload
page... but after doing more research, I think
Hi Curt, thanks for the feedback/input and your time. :)
Curt Zirzow wrote:
It would have been more relevant to supply the problem along with the
solution.
Definitely. Sorry about that. Sometimes I post questions to forums/lists
without thinking things through more thoroughly... Hehe, I half
Rasmus Lerdorf wrote:
More info on it at the following links:
http://yuiblog.com/blog/2006/09/22/yahoo-devday-schedule/
http://nate.koechley.com/blog/2006/09/22/hookytime-yahoo-developer-day-hack-day-on-sept-29th-and-30th/
http://del.icio.us/chadd/yhackday
This too:
Chris wrote:
While it's annoying I think it's going to be one of those things you
have to live with.
Or switch email apps. Thunderbird is pretty good about threading list
emails.
Can you configure your email app to read something other than the
Subject for threading?
--
Wishlist:
Not sure of your project requirements, but you might want to think about
Director/Havok/Shockwave...
http://www.adobe.com/support/director/3d_basics.html
--
Wishlist: http://snipurl.com/vrs9
Switch: http://browsehappy.com/
BCC?: http://snipurl.com/w6f8
My:
I think I have come across situations where heredoc is the most
useful/best solution... although, I can not remember any specific
examples...
I would hate to see it deprecated... I find it very useful from time to
time. :)
--
Wishlist: http://snipurl.com/vrs9
Switch:
Hi,
This is probably simple to answer for most of ya'll, but...
preg_replace_callback($f, 'mah_processTags', $text);
Besides the matches, how would I pass function args/param to
mah_processTags()?
For example, I would like to do something like this:
preg_replace_callback($f,
Casey wrote:
preg_replace_callback($f, 'mah_processTags(\'$0\', $arg1)', $text);
Does this work?
Awww, does not seem to work. :(
But maybe I need to dink with the code a bit more...
I would like to avoid setting a global here. :D
Thanks for the help Casey! I will let you know if I get it
Casey wrote:
Hmmm. I've searched around, and it seems that only a global would work :/
Thanks for the help Casey! I really appreciate it. :)
Yah, I think I will use a global for now... Until I can think of an
alternative coding approach.
Have a good one!
Cheers,
Micky
--
Wishlist:
Casey wrote:
What does mah_process_tags do anyway? XD
Ah, hehe... Oh, basically I am trying to write a plugin for the
Textpattern CMS:
http://textpattern.com/
processTags() is a core TXP function... Basically, it parses any TXP
template tags (txp:function_name atts=foo /).
Long story
Hi all... sorry if this is OT for PHP list... Maybe a reply off-list?
I just wanted to share my .htaccess file in the hopes that I can
hone/fool-proof-a-tize it as much as possible via your feedback and
suggestions.
Here is what I got so far...
I start by turning-on error reporting, then I am
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Do you need to do it with a mod_rewrite?
if not, you can do it easily in php:
header('location: folder/file.php');
exit();
in index.php.
Unfortunately, yes... I am using a CMS, and my current setup is forcing me
into
Well, I added this to the end of my .htaccess:
# Set the index page:
RedirectMatch ^/$ http://mydomain.com/folder/folder/index.php
Seems to work well, but I am still concerned about
pitfalls/optimization/consolidation... er, perfection? ;)
TIA, Cheers,
Micky
--
PHP General Mailing List
-Original Message-
From: Joe Wollard [mailto:[EMAIL PROTECTED]
I'm not an expert on the topic by any stretch of the
imagination, but I seem to recall reading that it's best to
move everything into httpd.conf for performance reasons. You
may want to investigate that, but
Hi Richard,
Doing it on only the URLs *you* think of typing doesn't count. Those
pesky real users can come up with some really interesting URLs to
type... :-)
Lol, I was thinking that might be a problem.
Thanks for all the great tips, I really appreicate your help.
Great info... I am
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Abandon Outlook and use Eudora, or Pegasus, or webmail, or ANYTHING
other than Outlook? :-)
LOL! Yeah, I do not know what I was thinking in the first place... Eudora
sounds good to me. :D
Cheers,
Micky
--
PHP
Good thread. Great points.
I always thought this Sitepoint thread was very helpful:
http://snipurl.com/qafg
Cheers,
Micky
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ligaya Turmelle wrote:
here is the link for the improved newbie doc -
http://zirzow.dyndns.org/php-general/NEWBIE
Might be nice to see a link to the NEWBIE information in the footer of
the PHP list emails... know what I mean?
--
PHP General Mailing List (http://www.php.net/)
To
Hi all,
I have been rtfm on preg_replace, and I am a bit turned-off by how
complex reg-exing appears to be anyway, I would like to spend some
time learning how I would convert a file full of links that look like:
A HREF=/viewentry.asp?ID=343323PT=PERSONALITIES TARGET=_topFake Link
1/A
Micky Hulse wrote:
Any good links to tutorials and/or resources that teach one how to scrub
urls with PHP and regex?
Ah, missed this in the comment section of the manual:
http://www.tote-taste.de/X-Project/regex/index.php
Looks like a good place to start. :)
--
PHP General Mailing List
Ryan A wrote:
http://weblogtoolscollection.com/regex/regex.php
HTHs...Cheers,
Yeah, looks like a great resource, thanks! :)
Cheers,
m
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Koen Martens wrote:
You might be better off then by parsing the html file with DOM:
http://nl2.php.net/manual/en/ref.dom.php
Whoa, that is cool, I had no idea this was something PHP could do!
Thanks for the links. :D
Cheers,
Micky
--
PHP General Mailing List (http://www.php.net/)
To
Kevin Waterson wrote:
Try this quicky
http://phpro.org/tutorials/Introduction-to-PHP-Regular-Expressions.html
Sweet, good links all. Thanks for sharing! :)
Have a great day.
Cheers,
Micky
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I am looking for a very simple blog software... I would prefer something
that functions well with CSS and is standards compliant.
I am getting tired of setting-up the bigger full-featured blogging
packages for small/quick/simple sites. It would be nice to know what
others people prefer.
Dave Goodchild wrote:
Use WordPress - clean, css-based, standards-compliant. You can set up a
basic site very quickly. If you want me to walk you through an example
contact me off list ( [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]). I set up two installations,
www.abuddhistpodcast.com
Barry wrote:
Well if you have that often this case, i would prefer you code one for
yourself.
Oh, for sure. I completely agree... For the longest time (i.e. the
college years) I was against using other peoples blog software or
scripts... I would have never learned anything about PHP if it
Dave Goodchild wrote:
www.abuddhistpodcast.com http://www.abuddhistpodcast.com and
www.mediamasters.co.uk/dg/insp http://www.mediamasters.co.uk/dg/insp
Cool sites btw! Good work. :)
Cheers,
M
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Miles Thompson wrote:
Don't forget, PHP itself is a templating language. Just do a standard
page, with includes for headers and footers, menus, and content.
If he wants to change colour, then load a different stylesheet for a
given page or content section.
This way he can use the tool that's
Lol! Omg, you guys make reading my email so much more fun!
Cheers!
Micky
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ryan A wrote:
Its a mis-spelling of two words taken out of context,
its actually sock her and meant for Hillary Clinton
Hehehe, n1! :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Michael B Allen wrote:
Any ideas?
I plan on using this one for my next shopping-cart project:
http://www.cubecart.com/site/home/
CubeCart is an eCommerce script written with PHP MySQL. With CubeCart
you can setup a powerful online store as long as you have hosting
supporting PHP and one
Hi,
I have not done much Googling yet... thought I would ask here before I
spend a bunch of time searching for some guidance... What would be the
best function set for on-the-fly image manipulation (specifically image
rotation?)
Is it easily done? Possible? Worth the trouble?
Any links
Chris wrote:
It is.
http://www.php.net/image
There's even a function to do the rotations for you
http://www.php.net/manual/en/function.imagerotate.php
OMFG... I am such a schmuck!
:: Bangs head on keyboard ::
JK:Luhey; fdksahuioreufkjL: KHgfuidksja; fkdlsaah; lkhfkldjhsaljk
Hi,
Hehe, looks like I did not hit the hay just yet... too much geeking to do!
Chris wrote:
It's always interesting to see so many interpretations of the one thing :)
Yeah, no doubt! I found this on AlistApart:
http://www.alistapart.com/articles/randomizer/
Took me a few mins to figure out
tedd wrote:
Not as I see it. The first definition in the dictionary is seldom the only
correct definition.
Good point...
Not to be contrary, but:
What about when you are speaking in terms of computers, and specifically
images? Seems like if the subject is images on the computer,
rotation
Jay Blanchard wrote:
While we are splitting hairs, slideshow would only be applicable if the
images continued to change without page reloading.
LOL, good point! Hehee.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jay Blanchard wrote:
The other day I saw a temporary road construction sign that said Slow
Men Working and it gave me pause
Reminds me of:
Do you come from a land down under?
Where women glow and men plunder?
Can't you hear, can't you hear the thunder?
You better run, you better take
PHP gurus I need your help!
I worked on a small site for a client who uses a host that I think has
PHP running as or under CGI (not much experience with this type of setup
personally.)
Long story short, this host really sucks... they are very restrictive...
I guess understandably so,
Micky Hulse wrote:
PHP gurus I need your help!
Hmm, looking on the web it appears as though CGI will not help me with
my .htaccess probs... Sorry to bother you all with my silly questions. :)
I will contact the host on Monday to see if they offer any work-arounds.
Have a great day all
Joker7 wrote:
I would suggest you change host as this one seem very restrictive or ask
your host to edit the .htaccess file for you ;(
Hi Chris, thanks for the reply. :)
Yeah, I actually talked to client today, and they are fed-up with host
too... sounds like they want to make a switch
Hi Mike, thanks for the help, I really appreciate your time. :)
Michael Weaver wrote:
It's not a PHP trick, but it should work for you, even with restrictions.
Definitely a good option. Actually, that is close to what I am doing now:
?php
#header(Refresh: 0;
Tijnema ! wrote:
You can't stop me :)
http://86.86.80.41/dev/debug/tedd.php
It's cracked again :)
Maybe use flash for this... harder to crack? (Of course, Flash will open
door to other problems.)
Sorry, coming in on this late. Good work Tedd! Very interesting.
M
--
Wishlists:
tedd wrote:
...snip...
that's the reason for the alt attribute.
Thanks for clarification! :)
You are doing some great work with captchas... I also really like your
audio captcha experiments. Keep up the great work!
Cheers,
Micky
--
Wishlists: http://snipurl.com/vrs9
Switch:
I think I just read that PHP is ran as CGI on Dreamhost... this does not
sound good. Can anyone confirm?
What do you all think? Good? Bad?
I have dealt with one other server that did this (PHP as CGI) and I
hated it!
I just bought a years worth of hosting... I have a trial period so I
Micky Hulse wrote:
I think I just read that PHP is ran as CGI on Dreamhost... this does not
sound good. Can anyone confirm?
Found this:
http://php.dreamhosters.com/
I guess I am just wondering what your thoughts are when it comes to
running PHP as CGI? Good/Bad? Maybe I should not worry
Hi Tijnema! Thanks for the quick reply, I really appreciate the help. :)
Tijnema ! wrote:
Google tells me that it is an optional feature to run PHP as CGI,
default it is running under apache. Atleast that's what i found for
dreamhost.
Ah, from what I am reading, it sounds like that used to be
Hi Richard! Thanks for the help, I really appreciate your time and
advice. :)
Richard Davey wrote:
If you've got access to your account with them, you can confirm it
yourself. Check the output of a phpinfo().
Ah, lol. Good call:
Server API: CGI/FastCGI
Virtual Directory Support: disabled
Tijnema ! wrote:
I'm using www.dapx.com for my www sites. Setup is a pain in the ass
there, it can take a few days before you get a reply. But once you got
it, it's a really nice host. Nice speed, really 99.9% uptime, and not
much limited stuff :) safe_mode is even turned off :)
Ah, thanks for
Richard Davey wrote:
It will be the first of many :)
Yikes! Definitely gonna make the switch. Cheap it may be, but I need
reliable too!
Oh and hey... you'll soon experience the sporadic will it or won't it
nature of their Control Panel loading too. I always loved that one.
Doh! Yeah. Not
Miles Thompson wrote:
Have a look at www.hub.org. They host PostgreSQL world wide, you get a
virtual machine, not a virtual host, and they are v. helpful in setting up
software.
Ahhh, nice! Thanks for the tip. Looking at what they offer now. It is
going to be a close call between several.
Richard Lynch wrote:
You could confirm what you have on YOUR setup with:
?php phpinfo();?
faster and with more assurance of correctness than any mailing list
answer.
Yeah! Hehe. I feel like such a noob. I can not believe I did not think
of that first. Lol.
Here is what phpinfo() had to say:
Hi Sebe, thanks for help.
Sebe wrote:
yeah or `php -v` via cmdline.
Great! Thanks for tip on that one. ;)
by the way, isn't PHP w/FastCGI faster than using apache module?
A, really? DH does offer FastCGI support.
Hrmmm. So many things to consider! Lol.
Thanks again Sebe!
Cheers,
M
Hello,
I have a couple classes that generate navigation and a few other dynamic
xHTML template-based things...
What is standard practice for calling your template classes? In other
words: Is it good practice to create the class object for every page
view, or is there a better way to cache
Micky Hulse wrote:
What is standard practice for calling your template classes? In other
words: Is it good practice to create the class object for every page
view, or is there a better way to cache the object? I am using PHP 4.x.
Ack! Just found this great thread on Sitepoint:
http
Hi,
I pieced-together a script that will insert a string into another string
at a set interval of words... See here:
http://www.ambiguism.com/sandbox/truncate/truncate.php
[Click the view source link to view source.] :D
Basically, I need a setup a page where my client can paste an article,
Tijnema! Thanks for the quick reply! I really really really appreciate
the help. :D
Tijnema ! wrote:
Nice idea, but it seems that it isn't working correctly. I did this
example:
?php
for($x = 0; $x 100; $x++) { $string .= abc; }
echo break_up($string, 10, ||);
?
With your break_up function.
Just FYI, I did some slight upgrades/updates to the code... Seems to be
working pretty good now. :)
http://www.ambiguism.com/sandbox/insert/insert.php
Thanks again Tijnema!
Cheers,
Micky
--
Wishlists: http://snipurl.com/1gqpj
Switch: http://browsehappy.com/
BCC?:
Tijnema! You rock! Another great catch. :)
Tijnema ! wrote:
...snip...
the eregi function. So like this:
if(eregi('[0-9A-Za-zÀ-ÖØ-öø-ÿ]', $array[$i])) {
becomes:
if(eregi('[0-9A-Za-zÀ-ÖØ-öø-ÿ]', strip_tags($array[$i]))) {
That would fix it :)
Just updated the code. (Hehe, tis hard to catch
Tijnema ! wrote:
Didn't find anymore bugs yet, maybe later... if i find one i'll let you
know :)
Thanks again Tijnema!
I just read the not from Richard Looks like I might have wasted your
time on this one. :(
I just woke up... going to test wordwrap()
You know, I saw that in the
Micky Hulse wrote:
Shux. I have a feeling that, with the help of Tijnema, I just
re-invented wheel.
Wait! wordwrap() default behaviour is to count characters, not words.
wordwrap — Wraps a string to a given number of characters using a
string break character
I think that is why I initially
Brad Sumrall wrote:
But!
I am now noticing that the main page provides cookies called
_utma
_utmb
_utmc
_utmz
Hmmm
Wha? Never thought of that.
It looks like wordwrap() may not be what I am looking for (though, still
researching)... Either way, I am curious to hear what you would
Micky Hulse wrote:
Allowing cookies sounds like a security hole... Any suggestions for
beefing-up my security would be spectacular! :)
Ahhh, would that have anything to do with XSS?
http://www.php.net/manual/en/function.htmlentities.php
I thought striptags() would take care of such problems
1 - 100 of 198 matches
Mail list logo