Hey all,
I am quite horrible when it comes to regexps, but I have a string that
contains a complete url, like:
http://www.domain.com/this/is/it.html
And I need to strip everything but the domain so that I am left with:
www.domain.com
Can anyone help me out?
- John Vanderbeck
- Admin
Spam thats been going around lately. Good old money laundering apparently.
Friends have reported seeing it as well.
It better stop hitting the list over and over again though or i'm gonna
scream :)
- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign
I have been getting this as well, and it is _really_ starting to annoy me.
Why is this not filtered out anyways? I am the owner and admin of the
GameDesign mailing list, and our software automaticly filters these things
from the general list.
Please fix this :(
- John Vanderbeck
- Admin
Are you opening a session on each of the pages you want to use the
variables?
Calling session_register() I believe causes an implicit opening of the
session, but on the other pages you have to explicity open the session, or
you won't have access to those vars.
- John Vanderbeck
-
denied message whenever I try to connect.
Could something ELSE be causing this error?
- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues
--
PHP General Mailing List (http://www.php.net/)
To
Try,
\n";
?>
Some systems are configured to not allow the shorthand "http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues
> -Original Message-
> From: Alvaro Collado [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 8:36 PM
> T
creating a bunch of new databases, and tables.
Thanks!
- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues
> -Original Message-
> From: Ryan W. Zajicek [mailto:[EMAIL PROTECTED]]
> Sent: Mon
How about manually parsing the string out to give you chunks, that can then
be eval'd easy.
- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues
> -Original Message-
> From: King, Jus
I'm not sure what you mean...
[code]
$query = "SELECT username FROM Users WHERE userid=1";
$result = mysql_query($query, $link);
$user_data = mysql_fetch_assoc($result);
echo "my user name is ".$user_data["username"];
[/code]
Is that _not_ what you mean?
-
I to have never been happy with the way PHP handles actual secure sessions.
GameDesign was written to entirely use session based access. Both the main
user site, and the admin backend use it, and it works quite well.
- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com
Your location header should be a fully qualified URL, just like you had
typed it into your browser.
- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues
> -Original Message-
> From: Dean
But isn't VIM a *nix only tool?
The thread was about Windows IDE's. I'm always open to new editors though,
so if VIM is available for Windows, can you give an URL?
- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for
// build link
$title = "http://gamedesign.incagold.com/displayarticle.php?mode=article&id=".$
row ["article_id"]."\">".$row["article_title"]."";
}
echo $title."\n&q
I am a fan of UltraEdit. It has syntax highlighting and is a good all
purpose powerful editor. What I really like though is the ability to Open
>From and Save To FTP sites. This speeds up my work considerably.
- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.
you need to compile in the GD options, but are unclear on what the path's
are that it asks for.
Would anyone has the kindness to write up a quick Installation of PHP-GD for
Dummies? :)
Thanks a million!
- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign
evant
Can any of your regexp wizards help me?
Thanks!
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
identifier. Grr..
Thanks again. Your a deadline saver :)
- John Vanderbeck
- Admin, GameDesign
> -Original Message-
> From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 10, 2001 2:32 PM
> To: PHP User Group
> Subject: Re: [PHP] MySQL problem - stum
that
call.
- John Vanderbeck
- Admin, GameDesign
> -Original Message-
> From: Julian Wood [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 10, 2001 2:28 PM
> To: John Vanderbeck; PHP User Group
> Subject: Re: [PHP] MySQL problem - stumped
>
>
>
> Well, PHP
if I had a bad query, it
should have given me some sort of error when I output mysql_error(). No?
However, I did of course try changing it to AND instead of &&. But the
problem remains. Same error.
Any other ideas?
- John Vanderbeck
- Admin, GameDesign
> -Original Message-
*.***/db.php on line 147
Line 147, is the last line in the above snippet. I cleared out the path
name for security, no offense intended :)
Now, I KNOW that the db_connect() function is not the problem, as I use it
in many other places in this script with no errors. What am I missing?
-
holds user names and passwords?
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello,
I need to take a string and remove everything from the first "<" character
to the end of the line. I'm pretty sure I could do this with an
ereg_replace(), but I am horrible at regular expressions. Could anyone help
me with this?
- John Vandebreck
- Admin, GameDesign
--
PHP General Ma
Try changing your echo line to:
echo ("Welcome $HTTP_POST_VARS[username]!");
- John Vanderbeck
- Admin, GameDesign
>
>
>
> echo ("Welcome, " . $username . "!")
> ?>
>
>
>
> Thanks in advance
> Denis
>
>
>
>
ITry searching the drive(s) for the file. I dont know what the deal is, but
I found on my system that the session path specified in the php.ini file
isn't being used, it is using /tmp instead. Might be doing the same thing
for the upload path.
- John Vanderbeck
- Admin, GameD
Hello,
Does anyone know where I might find a good PHP script for analyzing apache
logs, with as much information as can be gathered?
I looked around on a few of the script sites, but didn't see any and I
thought this wierd.
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing
other file access function, and have spaces or empty lines that will
output before header() is called. The same problem exists when using a
single PHP/HTML file."
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "Brandon Feldhahn" <[EMAIL PROTECTED]>
To
Ok, ignore me. I'm an idiot.. I just found the striptags() fucntion.
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "John Vanderbeck" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 17, 2001 12:33 PM
Subject: [PHP] Str
ies to abuse it :)
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Well, since cookies are set in the header, I would say you would have to at
least refresh the same page. I'm just putting a cookie into my home page
for now. and it will be checked in just afew areas of the site that REQUIRE
the cookies to work right.
- John Vanderbeck
- Admin, GameD
x27;m sorry, but the ikmage format you submitted is not
a supported format.";
}
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
trans-sid
I'm guessing I could do this in a roundabout way, by setting a cookie, then
trying to read it back. However, I was wondering if there way a simpler
way?
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECT
Sorry about all these questions. Just a quickie. Does a session registered
variable take on global scope, or do I still need to do a "global
$my_session_var" to make my function see it?
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsu
I have Allaire and use it for web development, but i'm not happy with it. I
like the APP itself, but its such a resource hog, crashes all the time, and
causes other problems.
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "Hoover, Josh" <[EM
All my output scripts use stylesheets, that way they can be easily
customized.
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "Brian V Bonini" <[EMAIL PROTECTED]>
To: "Nguyen, David M" <[EMAIL PROTECTED]>
Cc: "PHP Lists" <
ence of "is", is in the word "this",
so do the replace..the replaced part in CAPS:
"thIS NOT" .. then the second "is":
thIS NOT IS NOT" etc..I think you can see why now..
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
'==' means is what is on the left equal to what is on the right.
C, and C based languages allow you to out an assignemtn statement even when
you intend a relational expression. It is a very common pitfall. I know I
have fallen into it in my C work many times :(
- John Vanderbeck
-
too common C error in your IF statement.
> if ((mysql_num_rows($result)) = 1)
should be:
if ((mysql_num_rows($result)) == 1)
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
y
it, then start a whole new session on the client?
I'm just starting to hate the looks of all these encoded urls being thrown
around as i'm developing the site. It is getting more and more complex, and
some of the stuff i'm passing in the urls is ugly, and some of it is not
go
egistred properly on the
server, but that is beyond me.
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "Thomas Edison Jr." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 2:07 AM
Subject: [PHP] HTTP authentication
>
o try and
gain access. And i'm not even open yet! So I want to make SURE my PHP
back-end will be as secure as I can make it.
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-ma
could be
long, noone has to read these names).
if I use the PHP gettimeofday() function and get the "usec" value, would
this be the same thing? The manual is unclear about what the usecs is in
reference to.
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://w
I still strongly recommend UltraEdit. It is SO flexible its unbelievable.
It also allows you to load from and save to files on an FTP server which
saves me , god I can't even measure how much that saves me.
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: &qu
n", $info);
echo $info[0];
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
$PHP_SELF were always global.
Sorry to have bothered everyone :(
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "John Vanderbeck" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 2001 10:59 AM
Subject: [PHP] RE: $PHP_SELF in
I can help you there, as I had the same problem until someone else helped
me. This is because PHP will escape the input it gets. I think this is
dependant on some enviroment setting, but I can't recall which one.
To fix it you call stripslashes($var);
- John Vanderbeck
- Admin, GameD
sn't work.
Again, all other varaibles are properly resolved, and in IE $PHP_SELF is
properly resolved.
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
d between scripts by
sending them through the URLs (index.php?mode=index). I guess what "annoys"
me, is I would expect those to be available from inside the functions, but
they aren't.
- John Vanderbeck
- Admin, GameDesign
>
> Visit the Gates Motel webgam
;;
So I am using that as a model:
echo ' A HREF=" ', $PHP_SELF, '?mode=index&category=',
urlencode($cateogory), ' ">Blah';
- John Vanderbeck
- Admin, GameDesign
>
>
> Visit the Gates Motel webgame:
>
PHP way a bit annoiying, but its workable, and i'm SURE there was a reason
for it. Just not sure what that reason was :)
- John Vanderbeck
- Admin, GameDesign
>
> Chris
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additiona
in -> $category";
DOES NOT WORK:
echo '',
$subcategories[$index], '';
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To cont
he link
>
> Netscape realizes this is invalid html and complains, IE simply reloads
> the current page.
>
No, that can't be it, because it actually gets resolvedI have echo'd it
out to the screen to verify, and it DOES get resolved in IE.
- John Vanderbeck
- Admin, GameD
- Original Message -
From: "Pavel Jartsev" <[EMAIL PROTECTED]>
To: "John Vanderbeck" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 12:49 PM
Subject: Re: [PHP] Netscape not resolving $PHPSELF ??
>
> Try $PHP_SEL
Well, yes the script was in the root (root of the URL not root of the
server). I threw it into a subdirectory, but no go. Same problem.
Very strange.
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "Jon Haworth" <[EMAIL PROTECTED]>
To: "'
7;';
and:
echo "Main -> $category";
Any ideas? This works FINE in Internet Explorer. And all the other vars in
those echo statements are properly resoved into value.
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
In most cases, using a switch is preferrable. The code is cleaner, and the
performance increases. This is true accross languages.
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "John Guynn" <[EMAIL PROTECTED]>
To: "Php (E-mail)" <[EM
What about just forcing the use of escaped quotes? Have you tried that?
instead of:
echo "document.write(\"
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 10:38 AM
Subject: [PHP] Mystery quotes
> I'm encountering the following problem and now wonder if it's related to
> magic quot
Hmm..noone has any ideas on this one? Its really driving me crazy
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "John Vanderbeck" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 11, 2001 10:01 PM
Subject: [PHP] fsca
pen("$thisdir/item.dat", "r");
fscanf($item_file, "%s\n%s\n%s\n%s", $display, $asin, $description,
$link);
fclose($item_file);
PROBLEM:
$display comes out correct, but $asin, $descrition and $link are always
empty
SAMPLE FILE:
MyItem
11517
ThisIsMyDecriptio
Well,
There are about 3 or 4 sites on the net that will test your connection
speed, so it must be possible. I know MSN has one.
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "Andrew Golovin" <[EMAIL PROTECTED]>
To: "Adam Knight" <[
> I just wanted to try this:
>
> I take a link : http//www.xy.com/index.php?contents=HOME
>
> There I echo contents
>
>
>
I'm still learning PHP, but...
Why are you echoing it twice? Also, the first line, shouldn't it be:
Looks liek you dropped the sem
, but I find it the other way around.
Especially when it comes to Stylesheets, even using CSS Level 1, which is
like 5 years old. Netscape just plain ignores alot of attributes, or
handles them different from the spec, that it makes it such a pain getting a
page to look the same in both. Arg
/R
Well... $PHPSELF gives the full url to the current webpage..so if you are
at:
http://gamedesign.incagold.com/index.php
then $PHPSELF = http://gamedesign.incagold.com/index.php
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "Jason Jacobs" <[EMAIL P
I use UltraEdit (ultraedit.com). It does syntax highlighting and ALOT more.
The one feature that I REALLY like is the ability to treat files on my FTP
as if they were local files. It greatly simplifies things, and speed up my
development.
- John Vanderbeck
- Admin, GameDesign
- Original
Thanks everyone who responded. I got it fixed now. I didn't realize that
the included file resided in the same scope. Once I knew that it was easy
to take care of.
Thanks!
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "John Vanderbeck" <[EM
I need to be able to do:
This is embeded in one of my sites pages..However, the call with the var
added on won't work, it seems like its looking for a file with that whole
name. Does anyone know how I can do this?
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List
9091" is called,
then it will save the information, but if "book_reviews.php" is passed, then
its not defined and it goes to a different mode (which in my case is a form
to get the information)
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "Au
Thanks everyone..Seems it was a very simple thing I had searched
around on the PHP site, but i'm tired, and I must have missed it. Thanks!
- John Vanderbeck
- Admin, GameDesign
- Original Message -
From: "David Robley" <[EMAIL PROTECTED]>
To: "John Van
eally matter to \"me\"!
Note the addition of the escape sequences. How can I stop this? Is there
some function in PHP? Or am I goign to have to write a character routine to
strip out escape sequences?
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://www.php.net/)
uot;, $book_data_in);
echo "ASIN:";
echo "$book_data[0]";
echo "";
echo "Title:";
echo "$book_data[1]";
echo "";
echo "Description:";
echo "$book_data[2]";
echo "";
}
If anyoen can clear thi
69 matches
Mail list logo