Re: [PHP] socket_read can not read the whole HTTP page?

2007-12-27 Thread Eddie Dunckley
On Fri 28 Dec 07, Eddie Dunckley wrote: > On Fri 28 Dec 07, ked wrote: > > I wrote those script to get HTTP url content, and it works , but > and change this to > $in .= "Connection: closed\r\n\r\n"; soz that should be close not closed; -- Eddie - Chaos, panic, and disorder - my work here is do

Re: [PHP] socket_read can not read the whole HTTP page?

2007-12-27 Thread Eddie Dunckley
On Fri 28 Dec 07, ked wrote: > I wrote those script to get HTTP url content, and it works , but it > can't read the whole content of the page. > Blocked on "while ($out = socket_read($socket, 1024)) ". > $in .= "GET {$file} HTTP/1.1\r\n"; try to change this to $in .= "GET {$file} HTTP/1.0\r\n";

Re: [PHP] vim/php color scheme

2007-12-27 Thread Nathan Nobbe
On Dec 27, 2007 2:32 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > On Dec 27, 2007 2:27 PM, OOzy Pal <[EMAIL PROTECTED]> wrote: > > Daniel, > > > > Sweet! Mine is version 7.x but I got it. I will check under vim7x. I > > post if I have further questions. > > > > Thank you > >You're welcome, bu

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Albert Wiersch
""Albert Wiersch"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Yes, I have SSH access. I will keep that in mind. Upgrading to 5.2.5 may > have addressed this issue though. If not, then I'll concentrate on a > possible DNS resolution problem. Well, it seems to still be happe

[PHP] socket_read can not read the whole HTTP page?

2007-12-27 Thread ked
I wrote those script to get HTTP url content, and it works , but it can't read the whole content of the page. Blocked on "while ($out = socket_read($socket, 1024)) ". browser show the processbar all the time , and the page is not completed display, If I press ESC key to cancel the request , the

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Albert Wiersch
""Daniel Brown"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >That sounds like a DNS resolution error. If you have Telnet/SSH > or local console access, try doing a dig, traceroute, and ping series > on it. Hi Daniel, Yes, I have SSH access. I will keep that in mind. Upgr

Re: [PHP] vim/php color scheme

2007-12-27 Thread OOzy Pal
On Dec 27, 2007 10:32 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > On Dec 27, 2007 2:27 PM, OOzy Pal <[EMAIL PROTECTED]> wrote: > > Daniel, > > > > Sweet! Mine is version 7.x but I got it. I will check under vim7x. I > > post if I have further questions. > > > > Thank you > > You're welcome, b

Re: [PHP] vim/php color scheme

2007-12-27 Thread Daniel Brown
On Dec 27, 2007 2:27 PM, OOzy Pal <[EMAIL PROTECTED]> wrote: > Daniel, > > Sweet! Mine is version 7.x but I got it. I will check under vim7x. I > post if I have further questions. > > Thank you You're welcome, but try to keep non-PHP-related questions on their respective lists. This one is re

Re: [PHP] vim/php color scheme

2007-12-27 Thread OOzy Pal
Daniel, Sweet! Mine is version 7.x but I got it. I will check under vim7x. I post if I have further questions. Thank you On Dec 27, 2007 8:20 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > On Dec 27, 2007 12:02 PM, OOzy Pal <[EMAIL PROTECTED]> wrote: > > How can I edit these .vim files to tweak c

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Daniel Brown
On Dec 27, 2007 1:00 PM, Albert Wiersch <[EMAIL PROTECTED]> wrote: > > Some additional info. It seems I am getting these warnings when it fails: > > Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo > failed: Name or service not known That sounds like a DNS resolution er

Re: [PHP] fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Daniel Brown
On Dec 27, 2007 12:57 PM, Albert Wiersch <[EMAIL PROTECTED]> wrote: > What needs to be escaped for a URL anyway? I am just changing spaces to > '%20' now. Arbitrary code can still be injected unless it's properly sanitized, but that's beyond the scope here. Mainly, make sure quotes (singl

[PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Albert Wiersch
Some additional info. It seems I am getting these warnings when it fails: Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known Warning: fopen(http://wanganda2u.co.uk) [function.fopen]: failed to open stream: Now I have to find out why that

Re: [PHP] fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Albert Wiersch
""Daniel Brown"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Dec 27, 2007 11:31 AM, Albert Wiersch <[EMAIL PROTECTED]> > wrote: > >Are the URLs being passed to fopen() properly escaped? Are they > valid, complete with http:// placed before the domain? Try keeping a > l

Re: [PHP] vim/php color scheme

2007-12-27 Thread Daniel Brown
On Dec 27, 2007 12:02 PM, OOzy Pal <[EMAIL PROTECTED]> wrote: > How can I edit these .vim files to tweak colors. Where are colors defined? [This example assumes your version is 6.3 and it's a default installation. YMMV. -DPB] Color schemes and themes are in: /usr/share/vim/vim63/

Re: [PHP] fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Daniel Brown
On Dec 27, 2007 11:31 AM, Albert Wiersch <[EMAIL PROTECTED]> wrote: > > I noticed my script at http://onlinewebcheck.com was sometimes (fairly > often) failing to open some URLs that users have entered. fopen() returns > false very quickly, but when tried again with the same URL, sometimes it > wor

Re: [PHP] vim/php color scheme

2007-12-27 Thread Nathan Nobbe
if you want to try out all the colorschemes on your system you can do so pretty quickly and easily, with the following keystrokes: 1. Esc 2. (type) :colorscheme 3. space 4. tab through the available colorschemes -nathan

Re: [PHP] vim/php color scheme

2007-12-27 Thread OOzy Pal
On Dec 27, 2007 7:09 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > On Dec 27, 2007 11:00 AM, OOzy Pal <[EMAIL PROTECTED]> wrote: > > Anyone have a nice color scheme for php syntax highlighting in vim? I > > am using elflord and it is nice but the comment color is like the > > function color which m

[PHP] fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Albert Wiersch
I noticed my script at http://onlinewebcheck.com was sometimes (fairly often) failing to open some URLs that users have entered. fopen() returns false very quickly, but when tried again with the same URL, sometimes it works. What would cause this behavior? Why does fopen() occasionally fail to

Re: [PHP] vim/php color scheme

2007-12-27 Thread Daniel Brown
On Dec 27, 2007 11:00 AM, OOzy Pal <[EMAIL PROTECTED]> wrote: > Anyone have a nice color scheme for php syntax highlighting in vim? I > am using elflord and it is nice but the comment color is like the > function color which makes it confusing. I do all of my coding in ViM, and I just use the

Re: [PHP] vim/php color scheme

2007-12-27 Thread Nathan Nobbe
On Dec 27, 2007 11:00 AM, OOzy Pal <[EMAIL PROTECTED]> wrote: > Anyone have a nice color scheme for php syntax highlighting in vim? I > am using elflord and it is nice but the comment color is like the > function color which makes it confusing. > torte is my favorite; w/ a dark background. murphy

[PHP] vim/php color scheme

2007-12-27 Thread OOzy Pal
Anyone have a nice color scheme for php syntax highlighting in vim? I am using elflord and it is nice but the comment color is like the function color which makes it confusing. -- OOzy Ubuntu-Gutsy (7.10) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

RE: [PHP] control browser with tag

2007-12-27 Thread Andrés Robinet
> -Original Message- > From: Hiep Nguyen [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 27, 2007 11:51 AM > To: php-general@lists.php.net > Subject: Re: [PHP] control browser with tag > > ""Warren Vail"" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> i have two p

Re: [PHP] control browser with tag

2007-12-27 Thread Daniel Brown
On Dec 27, 2007 9:50 AM, Hiep Nguyen <[EMAIL PROTECTED]> wrote: > if user clicks on the hyperlink on list.php page, i want to open a new > windows for user to update info. once user clicks update on update.php > page, i want to close the update.php page automatically and refresh list.php > page.

Re: [PHP] control browser with tag

2007-12-27 Thread Hiep Nguyen
""Warren Vail"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> i have two pages: list.php and update.php >> >> list.php will have a hyper link that when click on, it will open a new >> window for user to update info. once user clicks update button on >> update.php page, i want to

Re: [PHP] Match for titles using pregexp

2007-12-27 Thread Robert Cummings
On Thu, 2007-12-27 at 13:53 +0300, OOzy Pal wrote: > On Dec 27, 2007 12:40 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Thu, 2007-12-27 at 11:27 +0300, OOzy Pal wrote: > > > more words/chars[2]more > > > words/chars > > > > > > How can I match for the title. In this case the word Hello us

Re: [PHP] Match for titles using pregexp

2007-12-27 Thread OOzy Pal
On Dec 27, 2007 12:40 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Thu, 2007-12-27 at 11:27 +0300, OOzy Pal wrote: > > more words/chars[2]more > > words/chars > > > > How can I match for the title. In this case the word Hello using regexp? > > > $text = 'more words/chars[ title="Hello">2]m

Re: [PHP] Match for titles using pregexp

2007-12-27 Thread Robert Cummings
On Thu, 2007-12-27 at 11:27 +0300, OOzy Pal wrote: > more words/chars[2]more > words/chars > > How can I match for the title. In this case the word Hello using regexp? 2]more words/chars'; $title = null; if( preg_match( '/title="([^"]*)"/Umi', $text, $bits ) ) { $title = $bits[1]; } echo

[PHP] Match for titles using pregexp

2007-12-27 Thread OOzy Pal
more words/chars[2]more words/chars How can I match for the title. In this case the word Hello using regexp? -- OOzy Ubuntu-Gutsy (7.10) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php