OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
php-general Digest 5 May 2008 03:26:31 -0000 Issue 5441

php-general-digest-helplists.php.net
Date: Sun May 04 2008 - 22:26:31 CDT


php-general Digest 5 May 2008 03:26:31 -0000 Issue 5441

Topics (messages 273856 through 273868):

Re: web based chat app
        273856 by: paragasu
        273858 by: Richard Heyes
        273863 by: Jon L.

Re: Web page excerpt editor
        273857 by: Paul Scott
        273864 by: Mike Potter
        273865 by: Robert Cummings
        273867 by: Mike Potter

retrieve email address
        273859 by: Yui Hiroaki
        273860 by: Richard Heyes

newbie needs help with insert('hop.php') problem
        273861 by: milt

Re: Execute command from web browser
        273862 by: Craige Leeder

Re: Question on PHP 6 and static calls to instance methods.
        273866 by: Nathan Nobbe

php page scrapping challenge!
        273868 by: paragasu

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


On Sun, May 4, 2008 at 4:47 PM, Richard Heyes <richardhphpguru.org> wrote:

> i did try to find opensource php + AJAX base IRC client. but found none.
> > but there is a PEAR library available to connect to IRC server. i will
> > look
> > into it
> > and try to write some IRC client. it gonna be fun ;)
> >
>
> Not having read the rest of the thread, I got mildly interested in this
> and made a simple web based chat thing. You can try it out with seperate
> browsers (simulating different clients). From what I remember it probably
> won't cope with the load you're refering to, but it's just an example (oh
> and (for better or worse) there's no need for an IRC server).
>
> http://www.phpguru.org/chat/chat.php

well, good example. but, it is not very convenient. i saw the code, it used
iframe and refreshing the page using meta tags. but, this method doesn't
work on all browser. if i am not
mistaken have problem with IE browser.

attached mail follows:


> well, good example. but, it is not very convenient. i saw the code, it used
> iframe and refreshing the page using meta tags. but, this method doesn't
> work on all browser. if i am not
> mistaken have problem with IE browser.

Well it's just an example, but you could use multiple methods of
refreshing the page to try and catch more browsers, eg. the Refresh:
header, Javascript etc. It uses an IFRAME so that when the page is
refreshed it doesn't lose whatever the user may have typed into the
form. Plus the progress bar "flashing" is irritating, though I believe
that could be removed by using AJAX to drag down the latest page instead
of refreshing the whole page.

--
Richard Heyes

+----------------------------------------+
| Access SSH with a Windows mapped drive |
| http://www.phpguru.org/sftpdrive |
+----------------------------------------+

attached mail follows:


IFrames have their issues cause they're meant to be separate documents;
making the documents interact is the challenge.

But I think you're going to have to use some sort of HTTP Streaming [
http://ajaxpatterns.org/HTTP_Streaming] to get it to receive messages
interactively.
You can use IFrames like the other project, periodic Ajax pings, or a Comet
framework [http://en.wikipedia.org/wiki/Comet_(programming)<http://en.wikipedia.org/wiki/Comet_%28programming%29>
].
There may be other methods, but those are all I've heard of.

As for Jabber, you may want to take a look at XMPP: http://www.xmpp.org/
It's the XML protocol and standards behind all Jabber development.

Also, you may try their Social mailing list:
http://www.jabber.org/discussion-lists
The entire purpose of the list is for helping enable Jabber in social
network sites.
Although, your discussion will probably need to be split up, since questions
about using Jabber in PHP generally belong on their JDev list.

- Jon L.

On Sun, May 4, 2008 at 12:46 PM, Richard Heyes <richardhphpguru.org> wrote:

> well, good example. but, it is not very convenient. i saw the code, it
> > used
> > iframe and refreshing the page using meta tags. but, this method doesn't
> > work on all browser. if i am not
> > mistaken have problem with IE browser.
> >
>
> Well it's just an example, but you could use multiple methods of
> refreshing the page to try and catch more browsers, eg. the Refresh: header,
> Javascript etc. It uses an IFRAME so that when the page is refreshed it
> doesn't lose whatever the user may have typed into the form. Plus the
> progress bar "flashing" is irritating, though I believe that could be
> removed by using AJAX to drag down the latest page instead of refreshing the
> whole page.
>
>
> --
> Richard Heyes
>
> +----------------------------------------+
> | Access SSH with a Windows mapped drive |
> | http://www.phpguru.org/sftpdrive |
> +----------------------------------------+
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


On Sun, 2008-05-04 at 10:12 -0500, Mike Potter wrote:

> Does anyone have any experience with something else? Alternately, has
> anyone written something they'd be willing to share under GPL?

FCKEditor, TinyMCE and a host of others. All JS based, so not really
relevant on a PHP list though

--Paul

All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm

attached mail follows:


Oops, I replied to Paul only.

On Sun, May 4, 2008 at 11:46 AM, Paul Scott wrote:

> FCKEditor, TinyMCE and a host of others. All JS based, so not really
> relevant on a PHP list though

Whereas, SnippetMaster *is* PHP-based. Sad if it's the only one, I
thought (hoped) there would be more.

Ski

attached mail follows:


On Sun, 2008-05-04 at 17:27 -0500, Mike Potter wrote:
> Oops, I replied to Paul only.
>
> On Sun, May 4, 2008 at 11:46 AM, Paul Scott wrote:
>
> > FCKEditor, TinyMCE and a host of others. All JS based, so not really
> > relevant on a PHP list though
>
> Whereas, SnippetMaster *is* PHP-based. Sad if it's the only one, I
> thought (hoped) there would be more.

When you can't find what you want, feel free to pick up you keyboard and
create the solution. Then be sure to share it with everyone else.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

attached mail follows:


On Sun, May 4, 2008 at 5:49 PM, Robert Cummings wrote:

> > Whereas, SnippetMaster *is* PHP-based. Sad if it's the only one, I
> > thought (hoped) there would be more.
>
> When you can't find what you want, feel free to pick up you keyboard and
> create the solution. Then be sure to share it with everyone else.

Perhaps I shall, in due time. As indicated earlier however, one of the
goals is something free and turnkey, so we can move on to the next
paying client. If time and money were no issue, I wouldn't have
bothered Googling up SnippetMaster in the first place. I'd have
started writing something from scratch as a first step. Alas...

Ski

attached mail follows:


I would like to retrieve email address from email with regular expression.

------email------------
.
.
.
From: testaddressgmail.com
.
.
.
------------------------------

if anybody know how to do it, please send me email.

Regards,
Yui

attached mail follows:


> I would like to retrieve email address from email with regular expression.
>
> ------email------------
> .
> .
> .
> From: testaddressgmail.com
> .
> .
> .
> ------------------------------
>
> if anybody know how to do it, please send me email.

Can, worms, everywhere. Try looking at the Mail::RFC822 package in PEAR.
There's also a shortcut function for just matching an Interweb email
address.

--
Richard Heyes

+----------------------------------------+
| Access SSH with a Windows mapped drive |
| http://www.phpguru.org/sftpdrive |
+----------------------------------------+

attached mail follows:


I am trying to get an order page working to submit credit card orders
and I am having trouble with the order page. the included file "HOP.php" is
in the same directory and it has both read and write permissions. I am
on a Linux and PHP 5.2.3 server. there are no PHP error messages.

I have this page of php code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4//strict.dtd".
<html>
<heading>
</heading>
<body>
<p align="center">(test a form using sample CyberSource code)</p>
    <p>&nbsp;</p></td>
  </tr>
  <h1 align="center"> Sample Product Name</h1>
  <p align="center">Description of Product </p>
  <?php ini_set ('display_errors', '1');
    error_reporting ('e_all'); ?>
  <?php echo "This is a PHP line BEFORE the include statement"; ?><br>
  <?php include("./HOP.php"); ?><br>
 this is a HTML line AFTER the include statement<br>

  <form action="https://orderpagetest.ic3.com/hop/ProcessOrder.do"
method="post">
    <div align="center">
      <?php /* insertSignature3 ("10.00", "usd", "sale"); */ ?>
      <input type="hidden" name="billTo_firstName" value="bulldog">
      <input type="hidden" name="billTo_lastName" value="Tortilla">
      <input type="hidden" name="billTo_email" value="johnDoegmail.com">
      <input type="hidden" name="merchantDefinedData1" value="ship">
      <input type="submit" value="Buy Now">
     </div>
   </form>
    <p> <strong> -- this is the last line of HTML code on this
page --</strong></p>
</body>
</html>

when the page is processed the "include" statement is replaced with the word
"null" on the output screen and the
insertSignature3 line is not processed and the html for the form is not
generated; the page stops right after this line,
but if I comment out the "insertSignature3" line, the form is generated
correctly with the submit button.
Does anyone have an idea of what might be the problem. I have also spent
several days with the cybersource.com
technical support and they do not know what is causing this and seem as lost
as I am.
Any and all help would be appreciated.

attached mail follows:


Well, you're missing a semi-colin after the exec() statement, and the echo.

If it wasn't the syntax error, make sure the program exists with file_exists();

- Craige

On Sat, May 3, 2008 at 11:28 PM, <opcorenses.com> wrote:
>
> Hi all
>
>
> I try write a code to execute service in my server from web browser
>
> I write next
>
> /var/www/html/squidup.html
> <?
> exec ('/usr/bin/squid/sbin/squid')
> echo "Squid UP"
> ?>
>
> but, don't work from web browser.
>
> What is wrong
>
> Thanks,
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


On 5/3/08, Adam Richardson <adamenvisionic.com> wrote:
>
> I have a quick question on what's coming in PHP 6.
>
> I've incorporated use of the ability to call instance methods through
> static calls, allowing for me to mimic multiple inheritance without having
> to make edits to classes that are already working because of the behavior of
> '$this' when instance methods are called statically.
>
> As stated on in the basics section on classes and objects:
>
> "$this is a reference to the calling object (usually the object to which
> the method belongs, but can be another object, if the method is called
> statically from the context of a secondary object)."
>
> I've made great use of that functionality in my framework. However, It
> sounds like this is going to cause a fatal error in PHP6. Is this in fact
> true? And, if the behavior is going to change, can somebody explain what
> the impetus for this change was?
>

this is an interesting feature; i was not previously aware of it. its
something akin to javascripts concept of the execution context and the
apply(), call() methods. i think it would be better if the class that used
the $this keyword whereby it was made to refer to the instance of the
caller, have access to the protected members of the other class. i think
this would be reasonable because the client has to invoke the method on the
class that intends to use the $this keyword in the context of its caller;
essentially sanctioning access to protected members. i think the feature
would be quite awesome if that were the case and i can imagine instances
where i would use it.

-nathan

attached mail follows:


well, this going to be fun.

the website i am trying to scrapped is http://www.cathayholdings.com.my/
it is a movie cinema website with very irritating design. They really tried
to imposed the
security to the point it is really not user friendly. The whole website
written in asp.

I really hate to go around looking for the show time for the latest movie
and decided to
build my own simple website to display the movie and show time from the
cathay cinema
my own way.

But, it is proven not so easy to do. The datetime buried deep inside the
online booking. Thus
user will be able to see the showtimes only when the user click the online
booking. Then, after
user click the online booking, the link open on a new window and generate a
cookies. this cookies
will be part of the URL. So basically, there is two cookie value pass to the
server. (one GET request & one in HTTP header)

Apart from that, they use javascript (AJAX?) to pull the showtime from the
server after you have to
click 3 times. OMG.. i only wan't to know the time and have to go thus whole
step.

using php curl library to simulate the request just to get the movie name
and show time list from the
server. it is possible? post your code..

** no reward, just for php programming fun..