trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
No. empty only excepts one argument.
-
include_path has nothing to do with what extensions are loaded.
-
Is this a joke? None of them can hold a note.
-
You really need to look into loops and arrays. There's no way I'm going through all that code though.
-
Where exactly are you lost? Were not here to write scripts for people.
-
AWstats OR other method to locate a specific visitor IP address??
trq replied to BizLab's topic in Apache HTTP Server
Says who? Of course there are also plenty of tools around for reading server logs (I think Awestats actually reads server logs) though, awk, sed & grep come to mind. -
Looking for best practice regarding paths in include/require
trq replied to martin05rc's topic in PHP Coding Help
As I said, you need to remove the front slash. -
Looking for script that hides email and or phone numbers in forum posts
trq replied to bnovak's topic in Javascript Help
Well, using php you could create a regex that searches for string that look like emails or phone numbers and then obfuscate them. -
You just described for yourself how it might work.
-
That completely depends on your ability, but it should be pretty straight forward.
-
Looking for script that hides email and or phone numbers in forum posts
trq replied to bnovak's topic in Javascript Help
Would be pretty useless doing this in Javascript as its client-side and could be easily worked around. -
Looking for best practice regarding paths in include/require
trq replied to martin05rc's topic in PHP Coding Help
That is exactly what your current setup should do. -
Yahoo likely provides an api of some sort for this, I'd start there.
-
What exactly is your actual problem now?
-
ODBC is used to connect to databases, you would need a soap client or custom parser to connect to a web service.
-
Where exactly are you stuck?
-
Its not rocket science. The variables you put in the database need to remain intact. eg; Don't override $fileName with your random string.
-
Given your examples: cplfunctions.php if ($num >=1) { $status = '0'; } else { $status = '1'; } ecuo $status; And the jQuery. $.post( "cplfunctions.php?action=checkUsername", { username: username }, function(d) { console.log(d); } ); See http://api.jquery.com/jQuery.post/ for more details.
-
Looking for best practice regarding paths in include/require
trq replied to martin05rc's topic in PHP Coding Help
If the common directory is within your document root you need to remove the slash on the front of it. As for books or articles, I'm really not sure. The way I described above is pretty much how most of the big frameworks do it. -
Install older php version / or use embedded GD library
trq replied to KakkArlak's topic in PHP Installation and Configuration
Have you configured Apache to use the manually installed version? I'm still not really sure this is a wise thing to do. -
Yes. But I could easily make a random name generator. Its applying it to the name of the file that is uploaded. Then, on this line..... $filePath = $uploadDir . $fileName; Replace $fileName with your randomly generated file name.
-
Wow Dude! I'm suffering with information overload "lol" There is a lot of info in there, isn't there! My head is spinning man. Yeah, there probably is allot in there, but its programming, its not a simple task. Learning the right way the first time will prove much more beneficial than learning things the wrong way. Its always good to get a firm grip with the basics first, from there, its just logical thinking.
-
Looking for best practice regarding paths in include/require
trq replied to martin05rc's topic in PHP Coding Help
I work with allot of oop code and I have my own framework of sorts (we'll call it foo), so things may be a little different, but you should be able to apply similar practices. If this is the structure your hosting has given you (again, I use my own servers so this is just a guess at an example.... [pre] /home/yourusername /htdocs [/pre] I would make my own libs directory and place it on the include path. [pre] /home/yourusername /htdocs /libs [/pre] I would then place my framework within libs.... [pre] /home/yourusername /htdocs /libs /Foo /Config /Controller [/pre] Then, within my php scripts I can easily include the classes I won't by simply using.... <?php include 'Foo/Controller/Front.php'; ?> This (pseudo) namespaces all my own libs into the Foo directory and is exactly how Pear works. Of course this ends up getting taken further by using an autoloader so I don't really have to include anything at all. Given the above structure, using the Pear/Zend naming convention and using this simple autoloader.... function __autoload($class) { require_once str_replace('_', '/', $class) . '.php'; } I can now just instantiate classes without even needing to include them. eg; $fc = new Foo_Controller_Front; This might be getting a bit too far ahead of your needs but I'm just giving you an example of what can be done.