Hi,
Some time back I came on the list and asked your
advise for a class that gets RSS feeds from diff
sites, I got quite a few good sites and a particular
class that was really good.
Unfortunatly I lost it in a webhost change but here is
what it did:
It got the feed and cached it for a day (or two
Hello,
I am a bit confused :-(, this is my server path:
/home/sites/site80/web/articles/myfile.php
from "myfile.php" I want to include "header.php" which
is located in:
/home/sites/site80/web/templates/
/*
eg:
/home/sites/site80/web/articles/myfile.php
/home/sites/site80/web/templates/header.
--- Jay Blanchard
<[EMAIL PROTECTED]> wrote:
> [snip]
> /home/sites/site80/web/articles/myfile.php
>
> from "myfile.php" I want to include "header.php"
> which
> is located in:
>
> /home/sites/site80/web/templates/
>
> /*
>
> eg:
> /home/sites/site80/web/articles/myfile.php
> /home/sites/site80
Hey everyone,
**
Have you tried
$_SERVER['DOCUMENT_ROOT'].'/';
**
Matt,
DAMN! THATS what I was looking for.
No, didnt try that, took the long route home instead,
but atleast brushed up on php's "explode" function.
**
$baseDir = $_SERVER["DOCUMENT_ROOT"];
$templatesDir = $baseDir . "/templates/
Hi,
Does anybody know of a good place to learn how to work
with regex?
Google has quite a few links for "learn pattern
matching" or "learn php regex" but none that start you
on "baby steps".
Any recommendations?
Thnx,
Mag
=
--
- The faulty interface lies between the chair and the keyb
> This helped me get started with Perl-compatible
> regular expressions:
>
> http://www.weitz.de/regex-coach/
>
Thanks Jason, will try it immd.
Cheers,
Mag.
=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, ev
Hi,
After searching the archives and google I found a
class that does bb code conversions, although I know
how to use classes (thanks to the docs the writers
write) I dont really understand them too well.
The class is REALLY good and covers all my needs
(which is to display php code in colors) but
--- Jason Barnett <[EMAIL PROTECTED]> wrote:
> No offense intended, but I'm not going to read
> through all of that. Narrow down
> the code block that gives you problems and then post
> that one block here... not
> the entire class.
>
Hey Jason,
No offense at all taken, am happy you read part
Thanks,
Will first try learning RegEX then will move onto
classes ore again will have problems in the future.
Will screw around with the class and see what happens
but if you do figure it out, please drop me a line.
Thanks,
Mag
--- Jason Barnett <[EMAIL PROTECTED]> wrote:
> > Hey Jason,
> > No of
Hi,
instead of showing my index.php page located at /
I want to show my index.html page located at /cached/
but I dont want to use javascript as the clients JS
might be off...and I dont want to get blacklisted by
the search engines for redirecting...
I did read somewhere that you can redirect via
Hey,
Dont worry about it, found it:
http://www.thinkhost.com/services/kb/301-redirect.shtml
Thanks,
Mag
=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
___
> Jay Blanchard wrote:
> > Yes, anything is possible.
>
> Can I be the next Queen of England?
>
> --
> John C. Nichel
Anythings possible...and with all your choices you
want to be an old fart??
:-)
=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity
Hi,
I need to use a couple of str_replace's in one of my
programs and would like to know which is more resource
friendly:
1) having multiple str_replace one after another
eg:
$text = str_replace("orange", "apple", "$text");
$text = str_replace("black", "white", "$text");
$text = str_replace("girl
--- John Nichel <[EMAIL PROTECTED]> wrote:
> Like I had a shot in hell of getting the answer in
> first with John and
> Curt trolling the list. ;)
Yep, those two guys are the highrollers here...also
known as the big guns so when they are aroundI
keep my little pistol voice out of it :-)
N
Hi,
I have 13 folders with a few thousand images each, now
the client wants me to export the "gallerys" to
another server that does not run phpso he wants
plain .htm files.
Below is how far I have come to "porting" this... the
idea being: generate .html files then simply copy the
images folder
--- Justin Patrin <[EMAIL PROTECTED]> wrote:
> > 4: put 100 tags to call 100 images per page
> > (confused here)
>
> I put some code inline below. Should work. If you
> want a thumbnail
> gallery, you could also create thumbnails using the
> GD functions in
> PHP, same them, and create an img
Hey,
> Just change the echo to an fwrite.
>
> for($j = 0; $j < 100; ++$j) {
> if($pics[$i * 100 + $j]) {
>fwrite($handle, '');
> }
> }
Works like a charm, thanks a million.
-Mag
=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagi
Hi,
Have very little of idea of the GD functions (and dont
ahve imagemagik) so am having problems
1. I need to read all the images from a dir and write
something on it at the bottom right side of the
picture
2.save this image in a diff folder keeping the
originals as is.
I have worked out t
--- Jason Wong <[EMAIL PROTECTED]> wrote:
> On Thursday 05 August 2004 10:36, PHP Gen wrote:
>
> > Have very little of idea of the GD functions (and
> dont
> > ahve imagemagik) so am having problems
>
> So RTFM.
I *DID* RTFM, just am more confused after
> Big clue: look up each of the image*() functions
> used in your class and find
> out what they do.
Arn't you the genius?
I dont know if you read my older posts (around 2-3
days ago) when I asked if someone could recommend a
good place to learn about PHP classes...
Still learning and still
Hey,
> Here's another big clue: have
> a look at the section of the class which does the
> output.
I did, but forget it, I got another answer from Wudi
that is far more helpful and I think a starting point.
I guess knowing the answer and still playing games
makes you feel all powerful, to each
Hi,
I have a function that reads jpg files (thumbnails)
from a directory and puts all the files names into an
array...I want to sort that array by the filename,
problem is, I dont know if filenames will be pure
numeric (eg 001.jpg,002.jpg) or alpha-numeric
(asdf001,asdf002)
It HAS to be sequential
Hi Curt,
Damn, looks like I (unintentionally) gave you guys
quite a challenge! You're the first one to reply and
looks like you sure worked on it!
> For starters, if your going to provide some code,
> make sure its
> readable by others.. trying to figure out what it is
> doing is
> nearly impossi
Hi,
I am just starting out with regex (and classes) so am
not sure how to do this...
I am seeing if a HTML file exists, if yes, I am using
file_get_contents to get the entire HTML file into a
string.
In the HTML file I already have this:
whatever you want comes here
How do I use a regex to
Hi,
I am using flush() and ob_flush() in one of my scripts
and its working great.., just one problem, as it keeps
outputting x on the screen the page just stays on
top...is there anyway (I am not sure via php...but
maybe JavaScript? ) to make the browser "follow" the
output below
eg:
keep the s
> Hi,
>
> I can't answer your regexp question but some
> thoughts on file() etc.:
> - file() returns the contents line by line as an
> array, so this makes only
> sense if you need the contents in this form, e.g.
> for looping through each
> line and applying a function or whatever
> - fread() re
--- John Holmes <[EMAIL PROTECTED]> wrote:
> PHP Gen wrote:
> > Hi,
> > I am using flush() and ob_flush() in one of my
> scripts
> > and its working great.., just one problem, as it
> keeps
> > outputting x on the screen the page just stays
> on
&g
Hi,
I am using a header("location:") to send a
rawurlencod'ed string to another script...then I tried
decode it and use those values...but its not
working...
snippets of my code:
// sending file:
$one=rawurlencode("dir_name=$dir_name&imgs_dir=$imgs_dir&thumb_pre=$thumb_pre&tn_width=$tn_width&tn_
Hi all,
Our company has decided to encrypt the php programs
that we sell, I have to choose which encryption
package to buy.
After a lot of seaching (on this list(archives),
google, forums etc) I saw a quite a few products like
ioncube, zend, codesecure, blender, mmCache encryptor
etc etc
unfortun
Hi,
Thanks for replying.
> And the loss is entirely theirs. MMache really can
> take a load of your
> webserver.
True, but its easier to tell a webhosting company to
install a Zend product as they are the maker of PHP
blah blah than to tell them to install an "untrusted"
3rd party app like mmCac
--- raditha dissanayake <[EMAIL PROTECTED]> wrote:
> PHP Gen wrote:
>
> >>how about using SSH tunneling instead.
> >>
> >>
> >
> >Never tried it, any examples for a win2k pro
> machine?
> >
> >
> There are some tutorials
I believe there is some confusion on what ABS actually does. Ignoring all
the rounding that you are trying to do ABS is a very simple function.
ABS definition: Returns the absolute value of number.
What that means is.
Abs(1) = 1
Abs(2) = 2
Abs(3) = 3
Abs(0) = 0
Abs(-1) = 1
Abs(-2) = 2
Abs(-3) =
Hi,
Thanks again John, point taken...will not trust the
browser, will use sessions :-)
Cheers,
-Mag
--- John Holmes <[EMAIL PROTECTED]> wrote:
> PHP Gen wrote:
>
> > // sending file:
> >
>
$one=rawurlencode("dir_name=$dir_name&imgs_dir=$imgs_dir&
33 matches
Mail list logo