Re: [PHP] XML and htmlentities conditionally?

2006-01-29 Thread Adam Hubscher
Brian V Bonini wrote: On Sun, 2006-01-29 at 02:01, Adam Hubscher wrote: I have a block of XML that looks as follows: namelt;*_~_*gt; Røyken VGS lt;*_~_*gt;/name My question is, can I in any way efficiently (i -stress- efficiently, if anyone read my previous XML and special characters

Re: [PHP] XML and special characters

2006-01-28 Thread Adam Hubscher
Steve Clay wrote: Sunday, January 22, 2006, 10:10:54 PM, Adam Hubscher wrote: ee dee da da da? sect;eth; -- those that look like html entities are the represented characters. I was mistaken, they are html entities, Can you show us a small chunk of this XML that throws errors? You said

[PHP] XML and htmlentities conditionally?

2006-01-28 Thread Adam Hubscher
I have a block of XML that looks as follows: namelt;*_~_*gt; Røyken VGS lt;*_~_*gt;/name Now, if I run that block of XML through htmlentities, I will get the following: name*_!_* Røyken VGS *_~_*/name XML parsers will return a problem, as there is both an unclosed tag and an invalid tag,

[PHP] XML and special characters

2006-01-22 Thread Adam Hubscher
I've been having a tough time with parsing XML files and special characters. I have attempted every applicable engine, last try SAX, to attempt at parsing a (rather large, 17.8mb) xml file. The problem I hit, is when it hits a UTF8 encoded character. I've attempted at decoded the file before

Re: [PHP] XML and special characters

2006-01-22 Thread Adam Hubscher
tedd wrote: I've been having a tough time with parsing XML files and special characters. -snip- Any suggestions as to how I could get around this seemingly impossible road block thats been placed by what seems to be the xml engines :O.. Adam: I believe that these special character will

Re: [PHP] XML and special characters

2006-01-22 Thread Adam Hubscher
Adam Hubscher wrote: tedd wrote: I've been having a tough time with parsing XML files and special characters. -snip- Any suggestions as to how I could get around this seemingly impossible road block thats been placed by what seems to be the xml engines :O.. Adam: I believe

[PHP] Dynamic Images and File Permissions

2005-07-14 Thread Adam Hubscher
I have a script that generates, creates, and updates dynamic banner images for users of a service. Recently I have run into a problem with file permissions... that has thoroughly annoyed me. I found a solution to fix the problem, however, it was then hit with another problem, and I'm not sure

[PHP] Dynamic Images and File Permissions

2005-07-13 Thread Adam Hubscher
I have a script that generates, creates, and updates dynamic banner images for users of a service. Recently I have run into a problem with file permissions... that has thoroughly annoyed me. I found a solution to fix the problem, however, it was then hit with another problem, and I'm not sure

[PHP] Re: Echo array string index?

2005-07-13 Thread Adam Hubscher
Matt Darby wrote: I have an array setup as such: *$arr['generated text']='generated number';* What would be the best way to echo the key in a loop? Seems pretty easy but I've never attempted... Thanks all! Matt Darby I'm not sure I understand the question. You could do foreach($arr as $key

[PHP] Redirection after login with security

2005-04-10 Thread Adam Hubscher
Synopsis: I am writing a management system for a MSSql database driven game, and I've run into an issue. The community site is located on a remote webserver, to protect the actual server from any possible vulnerabilities in the community application/forum application (as we all have seen the

[PHP] Re: $_POST

2005-01-17 Thread Adam Hubscher
Andrew Maxwell wrote: When you submit something, and you want to make sure that the user inputs all of the info, is there an easier way to do it than this: if ((!$_POST[name]) || !$_POST[pass]) || (!$_POST[blah])) { etc. } is there an easy way to check if all of the varibles have data in them?

[PHP] Socket_connect producing errors that show no reason

2005-01-17 Thread Adam Hubscher
The code looks like this: if(($sock = socket_create(AF_INET,SOCK_STREAM,SOL_TCP)) 0){ print(Couldn't Create Socket: . socket_strerror(socket_last_error()). \n); } socket_set_option($sock, SOL_SOCKET,SO_RCVTIMEO, array('sec' = 1, 'usec' = 0)); $output = ''; for($i = 0; $i count($file);

Re: [PHP] Socket_connect producing errors that show no reason

2005-01-17 Thread Adam Hubscher
Jochem Maas wrote: Adam Hubscher wrote: The code looks like this: if(($sock = socket_create(AF_INET,SOCK_STREAM,SOL_TCP)) 0){ print(Couldn't Create Socket: . socket_strerror(socket_last_error()). \n); } socket_set_option($sock, SOL_SOCKET,SO_RCVTIMEO, array('sec' = 1, 'usec' = 0)); $output

[PHP] socket_connect giving me weird error

2005-01-16 Thread Adam Hubscher
Warning: socket_connect() expects parameter 3 to be long, string given in testing.php on line 21 Couldn't Create Socket: Success It actually spits that across for every socket I'm trying to connect. I'm doing an online status for multiple servers, which I have tested to work when I simply do a

[PHP] Socket_Connect returning unusual error

2005-01-16 Thread Adam Hubscher
Warning: socket_connect() expects parameter 3 to be long, string given in testing.php on line 21 Couldn't Create Socket: Success It actually spits that across for every socket I'm trying to connect. I'm doing an online status for multiple servers, which I have tested to work when I simply do a

[PHP] socket_connect errors

2005-01-16 Thread Adam Hubscher
Ok, I had made a post earlier but bout 5min later I figured out the problem (I had spaces and returns that were in the array beside the ports). The code looks like this: if(($sock = socket_create(AF_INET,SOCK_STREAM,SOL_TCP)) 0){ print(Couldn't Create Socket: .

Re: [PHP] Socket_Connect returning unusual error

2005-01-16 Thread Adam Hubscher
Richard Lynch wrote: Adam Hubscher wrote: Warning: socket_connect() expects parameter 3 to be long, string given in testing.php on line 21 Couldn't Create Socket: Success PHP usually auto-converts data -- However it's possible that this EXPERIMENTAL function (?) doesn't have the magic code down

Re: [PHP] Preventing execution without inclusion

2005-01-14 Thread Adam Hubscher
Thomas Goyne wrote: On Thu, 13 Jan 2005 16:25:30 -0600, Adam Hubscher [EMAIL PROTECTED] wrote: 1 (the preferred way): user accesses http://www.example.org/index.php?function=Join, this loads the class NewUser and begins its implementation. Because of the __autoload, it includes

[PHP] Preventing execution without inclusion

2005-01-13 Thread Adam Hubscher
From within the application, I use one page to include classes/variables and so on. Is there a way (I may have been missing it in the documentation for PHP, however I didnt see anything related) to prevent a user from directly accessing/executing *.php by the file making sure taht it was only