php-general Digest 27 Apr 2010 04:54:58 -0000 Issue 6714

Topics (messages 304619 through 304638):

Re: What's your game? (X-PHP)
        304619 by: Dan Joseph
        304620 by: Ashley Sheridan
        304621 by: Dan Joseph
        304623 by: Ashley Sheridan
        304624 by: Dan Joseph
        304626 by: Bob McConnell
        304628 by: Williams, Dewey

Re: Weird problem with is_file()
        304622 by: Michelle Konzack
        304625 by: Peter Lind

Re: getting content exceprts from the database
        304627 by: Nathan Rixham

Admin Panel Ebook
        304629 by: Brandon Rampersad

Contact form....
        304630 by: Watson Blair
        304631 by: Adam Richardson
        304632 by: Dan Joseph
        304633 by: Watson Blair
        304634 by: Ashley Sheridan
        304635 by: Watson Blair
        304636 by: Brandon Rampersad

Re: CURL cannot connect to URL - IP address - after successful connection
        304637 by: Tommy Pham

¡°Îå²½Á¬¹á¡±¹ÉȨ¼¤Àø·¨
        304638 by: aopi

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Mon, Apr 26, 2010 at 7:48 AM, Richard Quadling
<rquadl...@googlemail.com>wrote:

> On 25 April 2010 14:16, tedd <t...@sperling.com> wrote:
> > What's your game?
>
> My wife and I play enjoy Baulder's Gate on the PS2 and I like the Lego
> (Star Wars, Batman, etc.) games on the PSP.
>
> The kids like to play Ice Age and Cars but crash a lot and end up
> shouting at each other.
>
Ice Age was a fine game!  I played that one a few years ago.  I'd like to
see another Diablo styled game come out in the modern setting.

-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code "NEWTHINGS" for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry

--- End Message ---
--- Begin Message ---
On Mon, 2010-04-26 at 12:41 -0400, Dan Joseph wrote:

> On Mon, Apr 26, 2010 at 7:48 AM, Richard Quadling
> <rquadl...@googlemail.com>wrote:
> 
> > On 25 April 2010 14:16, tedd <t...@sperling.com> wrote:
> > > What's your game?
> >
> > My wife and I play enjoy Baulder's Gate on the PS2 and I like the Lego
> > (Star Wars, Batman, etc.) games on the PSP.
> >
> > The kids like to play Ice Age and Cars but crash a lot and end up
> > shouting at each other.
> >
> Ice Age was a fine game!  I played that one a few years ago.  I'd like to
> see another Diablo styled game come out in the modern setting.
> 


Diablo 3 is out soon...

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Mon, Apr 26, 2010 at 12:36 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk>wrote:

>
>
> Diablo 3 is out soon...
>
>
>   Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
oh cool, I did not realize.. have they set a release date yet?  I didn't see
one on gamestop.com...


-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code "NEWTHINGS" for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry

--- End Message ---
--- Begin Message ---
On Mon, 2010-04-26 at 12:48 -0400, Dan Joseph wrote:

> On Mon, Apr 26, 2010 at 12:36 PM, Ashley Sheridan
> <a...@ashleysheridan.co.uk>wrote:
> 
> >
> >
> > Diablo 3 is out soon...
> >
> >
> >   Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
> oh cool, I did not realize.. have they set a release date yet?  I didn't see
> one on gamestop.com...
> 
> 


Not yet, but there's trailers on YouTube and it looks good so far. A few
more classes, different mobs, it looks good!

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Mon, Apr 26, 2010 at 12:52 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk>wrote:

> Not yet, but there's trailers on YouTube and it looks good so far. A few
> more classes, different mobs, it looks good!
>
>

The screenshots look great as well.  I am going to check YouTube for
trailers.  Maybe after they get Starcraft going they'll get this out.

-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code "NEWTHINGS" for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry

--- End Message ---
--- Begin Message ---
The last game I played was catch. My oldest grandson and I borrowed his
cousin's Harlem Globetrotters miniature basketball. I taught him how to
use spin to deflect the ball path when it bounced.

I actually don't recall the last time I played an electronic game.

Bob McConnell

--- End Message ---
--- Begin Message ---
The only online games I play are Guild Wars and - now - Dungeons and
Dragons Online (FREE!).  I haven't played vgaplanets in ages - too few
servers to get a decent game. Not certain I can even install my original
3.5 inch disk anymore!

Dewey Williams

> -----Original Message-----
> From: tedd [mailto:t...@sperling.com]
> Sent: Sunday, April 25, 2010 9:16 AM
> To: php-gene...@lists.php.net
> Subject: [PHP] What's your game? (X-PHP)
> 
> Hi gang:
> 
> Considering we recently had several people mention what games they
> play, it might be interesting to see what everyone plays.
> 
> As for me, I currently play "Modern Warfare 2" on XBOX. It's the most
> recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
> etc.).
> 
> My gamer tag is "special tedd"
> 
> What's your game?
> 
> Cheers,
> 
> tedd
> 
> 
> --
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Hello Pete,

Am 2010-04-26 17:04:32, hacktest Du folgendes herunter:
> Is it possible that the space is a new-line (or a carriage-return) ?

grmpf!  --  That it was...

>    preg_replace('/\s+$/','',$FILE);

Works now!

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsyst...@tdnet France           itsyst...@tdnet UG (haftungsbeschränkt)
Gesch. Michelle Konzack          Gesch. Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz               Kinzigstraße 17
67100 Strasbourg/France         77694 Kehl/Germany
Tel: +33-6-61925193 mobil       Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber linux4miche...@jabber.ccc.de
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
On 26 April 2010 18:58, Michelle Konzack <linux4miche...@tamay-dogan.net> wrote:
> Hello Pete,
>
> Am 2010-04-26 17:04:32, hacktest Du folgendes herunter:
>> Is it possible that the space is a new-line (or a carriage-return) ?
>
> grmpf!  --  That it was...
>
>>    preg_replace('/\s+$/','',$FILE);
>
> Works now!

Consider a trim, much faster for this thing.

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:
> I've been thinking about this problem for a little while, and the thing
> is, I can think of ways of doing it, but they're not very nice, and I
> don't think they're going to be fast.
> 
> Basically, I have a load of HTML formatted content in a database that
> get displayed onto the site. It's part of a rudimentary CMS.
> 
> Currently, the titles for each article are displayed on a page, and each
> title links to the full article. However, that leaves me with a page
> which is essentially a list of links, and that's not ideal for SEO. What
> I wanted to do to enhance the page is to have a short excerpt of x
> number of words/characters beneath each article title. The idea being
> that search engines will find the page as more than a link farm, and
> visitors won't have to just rely on the title alone for the content.
> 
> Here's the rub though. As the content is in HTML form, I can't just grab
> the first 100 characters and display them as that could leave an open
> tag  without a closing one, potentially breaking the page. I could use
> strip_tags on the 100-character excerpt, but what if the excerpt itself
> broke a tag in half (i.e. <acronym title="something"> could become
> <acron )
> 
> The only solutions I can see are:
> 
> 
>       * retrieve the entire article, perform a strip_tags and then take
>         the excerpt
>       * use a regex inside of mysql to pull out only the text
> 
> 
> The thing is, neither of these seems particularly pretty, and I am sure
> there's a better way, but it's too early in the week for my brain to be
> fully functional I think!
> 
> Does anyone have any ideas about what I could do, or do you think I'm
> seeing problems where there are none?
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 

/**
 * creates an abstract from any string, a nice one that stops at a full
 * stop or end of a word betwen 140-180 chars.
 *
 */
function createAbstract( $string )
{
        $lines = explode( "\n" , $string );
        if( count($lines) > 1 && strlen($lines[0]) > 140 ) {
                $string = $lines[0];
        }
        if( strlen($string) < 180 ) return $string;
        $string = substr( $string , 0 , 180);
        $chars = str_split( $string );
        $string = '';
        foreach( $chars as $char ) {
                $string .= $char;
                if( $char == '.' && strlen($string) > 120 ) {
                        return $string;
                }
        }
        $string = '';
        foreach( $chars as $char ) {
                $string .= $char;
                if( $char == ' ' && strlen($string) > 140 ) {
                        return trim( $string ) . '...';
                }
        }
        return $string;
}

/**
 * given an html (or fragment) tidy in to usable html
 * and strip back to text, new lines in tact
 *
 */
function htmlToText( $html )
{
  $html = str_replace( '&' , '&amp;' , str_replace( '&amp;' , '&' ,
$html ) );
  $config = array(
    'clean' => true,
    'drop-proprietary-attributes' => true,
    'output-xhtml' => true,
    'show-body-only' => true,
    'word-2000' => true,
    'wrap' => '0'
    );
  $tidy = new tidy();
  $tidy->parseString($html, $config, 'utf8');
  $tidy->cleanRepair();
  $html = tidy_get_output($tidy);
  $text = str_replace( '&' , '&amp;' , str_replace( '&amp;' , '&' ,
$text ) );
  return strip_tags($text);
}

using those two together should do it; they're pretty basic and could do
with a tidy, but gets the job done (you'll probably want to change the
140 chars to something different)

Best,

Nathan

--- End Message ---
--- Begin Message ---
Hello Guys,

I've bought a couple ebooks, especially from orielly, on PHP development and
they are mostly dealing with front end stuff about user interface and PHP
development. Could anyone refer me an ebook on back end programming ie Admin
Panel development in PHP especially for social websites hence it should
include user account management, permission system and more Thanks.

-- 
A Brandon_R Production

--- End Message ---
--- Begin Message ---
Hey guys, so ive coded a sucessfull contact form before, but for some reason
this bit of code is giving me the run-arroundl....

so my HTML end is:


<form action="send.php" method="post" enctype="multipart/form-data">
             <table border="0" cellspacing="2" cellpadding="0">
                       <tr><td style="text-align:left;"> Send E-mail to:
</td>
                    <td><input type="radio" name="to" value="
bestudios...@gmail.com">General Information</td></tr>
                    <tr><td></td><td><input type="radio" name="to" value="
ajaga...@akwimemorial.org">Founder and President: Professor Ajagi Nji,
Ph.D</td></tr>
                    <tr><td></td><td><input type="radio" name="to" value="
dtanw...@akwimemorial.org">Executive Secretary: Dorothy Tah
Tanwani</td></tr>
                       <tr><td style="text-align:left;"> Name: </td>
                    <td><input type="text" name="name" size="40"></tr></td>
                     <tr><td style="text-align:left;">Subject: </td>
                    <td><input type="text" name="subject"
size="40"/></td></tr>
                       <tr><td style="text-align:left;">E-mail Address:
</td>
                    <td><input type="text" name="from" size="40"/></td></tr>
                       <tr><td style="text-align:left;">Message: </td>
                    <td><TEXTAREA NAME="message" COLS=31
ROWS=7></TEXTAREA></td></tr>
                    <tr><td></td><td style="text-align:center;">

</td></tr>
                       <tr><td colspan="2" style="text-align:right;"><input
type="submit" value="Send E-mail" name="submit" /></td></tr>
             </form></table>

and the file send.php is:

<?php

$subject =$_POST"subject";

$message=$_POST"message";

$name=$_POST"name";

$from=$_POST"from"

$mail_from=$_POST"from";

$to =$_POST"to";

$header = "From: {$name} < {$from} >";

$send_contact=mail($to,$subject,$message, $header);

if($send_contact){
echo "Thank you for Contacting Us!";
}
else {
echo "An error occurred while sending your message, review your information
and please try again.";
}
?>

when i go to test it out all i get back is a blank screen with: ";
$send_contact=mail($to,$subject,$message, $header); if($send_contact){ echo
"Thank you for Contacting Us!"; } else { echo "An error occured while
sending your message, review your information and please try again."; } ?>
on it... when i take out the like "
$header = "From: {$name} < {$from} >";" i just get a blank screen, but it
dosen't send the e-mail.... i know i'm missing something really obvious, but
i just can't see it.
Thanks,
Watson

--- End Message ---
--- Begin Message ---
On Mon, Apr 26, 2010 at 3:16 PM, Watson Blair <bestudios...@gmail.com>wrote:

> Hey guys, so ive coded a sucessfull contact form before, but for some
> reason
> this bit of code is giving me the run-arroundl....
>
> so my HTML end is:
>
>
> <form action="send.php" method="post" enctype="multipart/form-data">
>             <table border="0" cellspacing="2" cellpadding="0">
>                       <tr><td style="text-align:left;"> Send E-mail to:
> </td>
>                    <td><input type="radio" name="to" value="
> bestudios...@gmail.com">General Information</td></tr>
>                    <tr><td></td><td><input type="radio" name="to" value="
> ajaga...@akwimemorial.org">Founder and President: Professor Ajagi Nji,
> Ph.D</td></tr>
>                    <tr><td></td><td><input type="radio" name="to" value="
> dtanw...@akwimemorial.org">Executive Secretary: Dorothy Tah
> Tanwani</td></tr>
>                       <tr><td style="text-align:left;"> Name: </td>
>                    <td><input type="text" name="name" size="40"></tr></td>
>                     <tr><td style="text-align:left;">Subject: </td>
>                    <td><input type="text" name="subject"
> size="40"/></td></tr>
>                       <tr><td style="text-align:left;">E-mail Address:
> </td>
>                    <td><input type="text" name="from" size="40"/></td></tr>
>                       <tr><td style="text-align:left;">Message: </td>
>                    <td><TEXTAREA NAME="message" COLS=31
> ROWS=7></TEXTAREA></td></tr>
>                    <tr><td></td><td style="text-align:center;">
>
> </td></tr>
>                       <tr><td colspan="2" style="text-align:right;"><input
> type="submit" value="Send E-mail" name="submit" /></td></tr>
>             </form></table>
>
> and the file send.php is:
>
> <?php
>
> $subject =$_POST"subject";
>
> $message=$_POST"message";
>
> $name=$_POST"name";
>
> $from=$_POST"from"
>
> $mail_from=$_POST"from";
>
> $to =$_POST"to";
>
> $header = "From: {$name} < {$from} >";
>
> $send_contact=mail($to,$subject,$message, $header);
>
> if($send_contact){
> echo "Thank you for Contacting Us!";
> }
> else {
> echo "An error occurred while sending your message, review your information
> and please try again.";
> }
> ?>
>
> when i go to test it out all i get back is a blank screen with: ";
> $send_contact=mail($to,$subject,$message, $header); if($send_contact){ echo
> "Thank you for Contacting Us!"; } else { echo "An error occured while
> sending your message, review your information and please try again."; } ?>
> on it... when i take out the like "
> $header = "From: {$name} < {$from} >";" i just get a blank screen, but it
> dosen't send the e-mail.... i know i'm missing something really obvious,
> but
> i just can't see it.
> Thanks,
> Watson
>

Maybe you just miscopied, but are you missing the brackets on the post array
vars (e.g., $from=$_POST["from"]) ?

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

--- End Message ---
--- Begin Message ---
Looks like you might have errors turned off.  I see:

$subject =$_POST"subject";

Which should be:

 $subject =$_POST["subject"];

$_POST is an array, and that's how you access those elements.  check to see
if errors are on, if not, you'll see errors in the log files.

-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code "NEWTHINGS" for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry

--- End Message ---
--- Begin Message ---
I knew i was missing something.... although it still doesn't work... i'm
still getting :

"; $send_contact=mail($to,$subject,$message, $header); if($send_contact){
echo "Thank you for Contacting Us!"; } else { echo "An error occured while
sending your message, review your information and please try again."; } ?>

would it make a difference that i'm running it off of my computer rather
than hosting it online?

Thanks,
Watson

On Mon, Apr 26, 2010 at 3:30 PM, Dan Joseph <dmjos...@gmail.com> wrote:

> Looks like you might have errors turned off.  I see:
>
> $subject =$_POST"subject";
>
> Which should be:
>
>  $subject =$_POST["subject"];
>
> $_POST is an array, and that's how you access those elements.  check to see
> if errors are on, if not, you'll see errors in the log files.
>
> --
> -Dan Joseph
>
> www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
> Code "NEWTHINGS" for 10% off initial order
>
> http://www.facebook.com/canishosting
> http://www.facebook.com/originalpoetry
>

--- End Message ---
--- Begin Message ---
On Mon, 2010-04-26 at 15:46 -0400, Watson Blair wrote:

> I knew i was missing something.... although it still doesn't work... i'm
> still getting :
> 
> "; $send_contact=mail($to,$subject,$message, $header); if($send_contact){
> echo "Thank you for Contacting Us!"; } else { echo "An error occured while
> sending your message, review your information and please try again."; } ?>
> 
> would it make a difference that i'm running it off of my computer rather
> than hosting it online?
> 
> Thanks,
> Watson
> 
> On Mon, Apr 26, 2010 at 3:30 PM, Dan Joseph <dmjos...@gmail.com> wrote:
> 
> > Looks like you might have errors turned off.  I see:
> >
> > $subject =$_POST"subject";
> >
> > Which should be:
> >
> >  $subject =$_POST["subject"];
> >
> > $_POST is an array, and that's how you access those elements.  check to see
> > if errors are on, if not, you'll see errors in the log files.
> >
> > --
> > -Dan Joseph
> >
> > www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
> > Code "NEWTHINGS" for 10% off initial order
> >
> > http://www.facebook.com/canishosting
> > http://www.facebook.com/originalpoetry
> >


That might be it if you're running Windows, although a Linux system
would usually have sendmail installed by default.

Also, make sure you validate your inputs. Don't put the to address as a
field within the form, leave that hard coded in your app, just let the
radio buttons switch between an array of values in send.php. Putting
them in the form like that could let anyone use your form to send email
to anywhere they wanted. Also, it's very simple to modify the from field
to include as many cc or bcc fields as someone wants, and use your form
as a spam relay system.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
ya, i'm working on a walk around now, i just wanted to get the function up
and running in it's most basic before i started supping it up, as it were. i
was thinking about using a switch and assigning each of my radio buttons a
value from 1 to 3...

On Mon, Apr 26, 2010 at 4:35 PM, Benjamin Hawkes-Lewis <
bhawkesle...@googlemail.com> wrote:

> [off-list]
>
> On Mon, Apr 26, 2010 at 8:16 PM, Watson Blair <bestudios...@gmail.com>
> wrote:
> > the file send.php is:
> >
> > <?php
> >
> > $subject =$_POST"subject";
> >
> > $message=$_POST"message";
> >
> > $name=$_POST"name";
> >
> > $from=$_POST"from"
> >
> > $mail_from=$_POST"from";
> >
> > $to =$_POST"to";
> >
> > $header = "From: {$name} < {$from} >";
> >
> > $send_contact=mail($to,$subject,$message, $header);
> >
> > if($send_contact){
> > echo "Thank you for Contacting Us!";
> > }
> > else {
> > echo "An error occurred while sending your message, review your
> information
> > and please try again.";
> > }
> > ?>
>
> Please note that code does not sanitize your inputs and would
> therefore be vulnerable to email header injection:
>
> http://www.nyphp.org/PHundamentals/8_Preventing-Email-Header-Injection
>
> --
> Benjamin Hawkes-Lewis
>

--- End Message ---
--- Begin Message ---
Ashley thank you for catching that, i caught it but then i saw your reply
further down.

On Mon, Apr 26, 2010 at 5:11 PM, Watson Blair <bestudios...@gmail.com>wrote:

> ya, i'm working on a walk around now, i just wanted to get the function up
> and running in it's most basic before i started supping it up, as it were.
> i
> was thinking about using a switch and assigning each of my radio buttons a
> value from 1 to 3...
>
> On Mon, Apr 26, 2010 at 4:35 PM, Benjamin Hawkes-Lewis <
> bhawkesle...@googlemail.com> wrote:
>
> > [off-list]
> >
> > On Mon, Apr 26, 2010 at 8:16 PM, Watson Blair <bestudios...@gmail.com>
> > wrote:
> > > the file send.php is:
> > >
> > > <?php
> > >
> > > $subject =$_POST"subject";
> > >
> > > $message=$_POST"message";
> > >
> > > $name=$_POST"name";
> > >
> > > $from=$_POST"from"
> > >
> > > $mail_from=$_POST"from";
> > >
> > > $to =$_POST"to";
> > >
> > > $header = "From: {$name} < {$from} >";
> > >
> > > $send_contact=mail($to,$subject,$message, $header);
> > >
> > > if($send_contact){
> > > echo "Thank you for Contacting Us!";
> > > }
> > > else {
> > > echo "An error occurred while sending your message, review your
> > information
> > > and please try again.";
> > > }
> > > ?>
> >
> > Please note that code does not sanitize your inputs and would
> > therefore be vulnerable to email header injection:
> >
> > http://www.nyphp.org/PHundamentals/8_Preventing-Email-Header-Injection
> >
> > --
> > Benjamin Hawkes-Lewis
> >
>



-- 
A Brandon_R Production

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: ioan...@btinternet.com [mailto:ioan...@btinternet.com]
> Sent: Monday, April 26, 2010 7:10 AM
> To: Tommy Pham
> Subject: Re: [PHP] CURL cannot connect to URL - IP address - after
successful
> connection
> 
> 
> 
> On 2010/04/27 1:13, Tommy Pham wrote:
> >> -----Original Message-----
> 
> > I assume that you did full testing with the browser as I suggested?
> > If everything works, one other thing to keep in mind is that the
> > target also may implement reverse DNS lookup in their anti-bot.  One
> > good way to test that is to remote in via SSH (if on Linux/Unix) to test
with
> wget.
> > Otherwise, I'm pretty sure that target site have some anti-bot
> > mechanisms in place.  Microseconds of analyzing valid 'user' requests
> > is better than processing 2-3 seconds and sending the response which
> > will consume bandwidth.  What you could also try is setting different
> > user-agents for every request and use cookies in cURL should the
> > target site have an anti-bot mechanism.
> >
> > Regards,
> > Tommy
> >
> >
> Yes, I think I have tested with/without cookies on the browser, trying
> different user agents (code emailed previously using array and rand) and
> cookies are used in script/not used.

And it works on subsequent requests?

> 
> I cannot work out how to use Putty/ssh/public private keys etc..wget...
> 

Learning how to use that is easier than learning to code PHP, IMO.
 
> I read about some problems with curl setting the port and a required patch
> on the server.
> 
> John

If cURL requires some kind of patch as you say, then it wouldn't have work
in the first place.  Perhaps it's better to post your (obfuscated personal
data) code.  Or try on your local PC on your local web server to eliminate
possibility of proxies, anti-bots, etc... problems to test that your code
works as intended and not cURL problem as you say.  I didn't have problems
using cURL before.  But then my targeted sites were very big companies and
didn't care about bots much.

Regards,
Tommy

PS:  Always reply to the list so others in the future can benefit unless
it's something personal.


--- End Message ---
--- Begin Message ---
下午 12:54:38


              《 “五步连贯”股权激励法--留驻核心人才  》

                    时 间:2010年5月29-30日(深 圳)  
                    时 间:2010年6月04-05日(上 海) 

  (股权激励第一人薛中行博士主讲)----为企业建立最完善的股权激励方案
------------------------------------------------------------------------
◆课程对象:企业总裁、董事长、总经理、决策者、人力资源总监、财务总监及薪
资福利经理、中高层管理人员、HR管理从业人员等。 

◆课--程--背--景: 
 * 如何让新员工入职后就有归属感?
 * 如何让老员工永具激情和创造力?
 * 如何让核心员工与企业同心同德?
 * 如何让公司高管与你不离不去?
 * 如何合理设计股权激励方案?◆如何能让激励达到长期有效?
 * 如何优化企业股权?
 * 如何在股权被稀释的同时保持控制权和经营权的统一?
 * 如何既保持企业股权激励的功能发挥,又能将其操作与法律风险控制到一个防火
墙内?…… 薛中行教授将在课上一一为您揭晓答案,手把手教您设计适合自身企业
的股权激励方案。 为您的企业打造“金手铐”,有效留住核心人才,增强企业凝聚
力;
  为您的企业打造“金钥匙”,彻底激发员工潜能,加速企业实现目标、发展壮大;
  为您的企业打造“金色降落伞”,圆满解决元老退出各大难题;
……目前,员工持股、年底分红等“股权激励”问题是众多企业最为关注的核心问题
,薛博士“手把手”教您运用股权期权这一独特的“创富机器”,为您的企业量身打
造一幅诱人的
               “金手铐”,开启人才价值的“金钥匙”。
------------------------------------------------------------------------
◆课--程--收--益:
  咨询式培训--课程采取小班制授课方式,这样可以更好的保证授课效果,方便现场
咨询与互动,让学员真正的能够学到、悟到、得到进而可以做到。创新性与唯一性-
-国内首家系统性的股权激励培训,先后创造了业内五个第一。系统性与全面性--课
程从人力资本提升的角度出发结合当前的法律、法规、财务、税务等各方面内容从方
案设计到激励实施都进行系统而全面的阐述。真实性与实用性---课程中所讲的股权
设计模式都是薛博士在近十年来他亲自参与的各大中型企业的实际顾问案例中总结提
炼出来的,完全都能转化运用在学员企业上.并且分享。
  股权激励方面的众多经典案例,具有极高的学习和参考价值。个性化与专业性---
由薛博士亲自与学员在workshop中进行一对一的辅导与交流,运用其深厚专业的学术
知识与丰富的实战经验为学员“量体裁衣”,制定最佳方案。 
------------------------------------------------------------------------
◆课--程--大--纲:
◇模块一 五步连贯股权激励法
(一)股权激励“前奏曲”
1、股权、股份与股票
2、实股、期股与期权
3、短期、中期与长期
4、赠与、购买与赊账
5、有形、无形与计量
思考:财聚人聚VS财散人聚?朝三暮四vs朝四暮三? 
(二)股----“好的模式是成功的一半”
1、期权模式
2、限制性股票模式
3、股票增值权模式
4、虚拟股票模式
研讨:如何根据自身情况,选择合适的股权激励模式组合?
动态股权制的建构 
(三)人----“重在人力资本投资”
1、对"岗"还是对"人"?
2、从精英到员工,多大范围股权激励才合适?
3、工作性质与股权激励:高管、核心技术人员,还是营销骨干?
4、定人三段论
5、股权激励留人的核心在哪里?
思考:《劳动合同法》下如何巧用股权激励达到激励和约束知识员工的目的?
(四)价----“人力资本可计量”
1、如何给企业合理估值定价?上市公司的期权定价模型
2、如何给人员合理估值定价?
3、技术管理要素如何合理入股?
4、如何合理设计激励杠杆?
思考1:内部市场价格VS 外部评估价格?
思考2:唐骏的十亿身价与紫金矿业的高溢价发行有无联系?
(五)量----“过犹不及、与时俱进”
1、你的蛋糕有多大?
2、从1%到10%
3、六十年后看你的企业
思考:如何合理分配股份、期权额度和数量?
既不缺乏激励力度,又避免过度激励,稀释股权。 股权激励的相对数论。
(六)时----“嵌套与循环”
1、 生命周期vs行业特点
2、 股权激励的长周期与短周期
3、 延期支付与股权激励
4、 8年限制期
思考:如何选择“对的时间”来完成对的事?
研讨:金手铐是如何铸就的?

◇模块二 股权激励方案设计技巧
(一)股权激励成功的七个关键要素
1、如何评价一个股权激励的成功?
2、股权激励7要素 
(二)股权激励争议案例深度剖析
1、TCL的股权激励:从赞许到失望
2、光明乳业:股权激励四人行
3、海尔高管为何辞职? 
(三)股权激励的设计环节与流程
1、 股权激励整体设计流程
2、 股权激励三阶段论
3、 如何循序渐进发展股权激励
4、股权期权的会计处理及有关问题 
四、我们该如何设计股权激励方案? 

◇模块三 股权激励相关法律问题 
1、案例分析:股权激励四大争议案例
2、证监会关于股权激励的有关规定
3、上市公司股权激励案例分析
4、财政部 国税总局等有关股权激励的规定
5、会计准则中的股份支付 
思考:如何在股权激励的同时设计限制性条款? 

◇模块四 股本设计股权治理技巧
1、如何合理设计股权
2、影子股票、信托股票与虚拟股票的对比。
重点研讨:如何有效设计法律防火墙,避免股权纠纷,规避为上市造成障碍

◇模块五 股权激励实战案例讨论会 
与薛中行博士深入探讨自身企业设计与实施股权激励方案涉及的种种实际问题。 
------------------------------------------------------------------------
◆讲--师--介--绍:
  薛中行博士:股权激励第一人;毕业于中国著名高等学府复旦大学,在复旦大学
经济管理学院接受现代经济学的培养,并多次应邀访学于英美等著名高等学府。同
时出于对中国优秀古典文化的热爱,中行博士亦潜心钻研《周易》二十余载,具有
现代商业经济与中国古典哲学的双重思维方式和文化底蕴。
◇中国证监会登记结算股权激励课题组组长
◇经济学博士、资深投资银行专家
◇中国股权激励第一人,国内实战派股权激励专家
◇企业“股权激励”领域的拓荒者、权威专家
◇担任近百家企业的首席咨询顾问
◇擅长讲授人力资源与资本运作各模块的课程,尤其是股权激励课程
◇中大、浙大等多家著名院校客座教授,主讲股权激励课程,满意度高达95%
◇先后创造了业内众多个第一:
第一家系统总结了各种股权激励案例,并在此基础上提炼出国内唯一成熟可行的“
五步连贯股权激励法”;
第一家采用“股权释兵权”,为浙江一福布斯上榜企业成功解决了“元老退出”难题;
第一家将“博弈论”的分析工具引入到中国企业咨询实际,帮助企业在战略制定、股
权分配、岗位评估、企业文化方面进行独特的应用;
第一家提出“人力资源股权化”、“人力资源证券化”概念,帮助大量企业解决员工
激励难题,实现了人力资源的资本化运作;
第一家帮助双家族企业解决了公司治理难题。
    薛博士有近20年的从业经验,组织并成功实施过众多著名企业公司的咨询项目,
其中包括海尔集团、宝钢集团、中石化、中外运、交通银行、华泰证券、泰阳证券、
汉王科技、海南航空、天津电力、北仑电厂、苏源集团、苏通房地产、亿达集团、长
甲集团、圣马纸业、苏常柴、民丰特纸、江苏交科院、临淄信用社、鄞州银行等,在
业界具有相当知名度。早年中行博士曾经任职于上海实业、华泰证券、联合证券等企
业,具有丰富的企业管理、企业上市、重组并购,的实战经验;熟悉ESOP(员工持股
计划)、限制性股权、业绩股票、分红权、虚拟股权、增值权等长期激励机制,在绩
效评估,平衡积分卡,薪资体系方面有着成功的案例,先后为多家福布斯上榜企业提
供咨询。
●导师授课风格
◇具有一流的讲师风格,亲和力强,是位极具人格魅力的讲师。
◇在中山大学、浙江大学等EMAB主讲的股权激励课程授课满意度连续4年排名第1。
◇深厚的理论功底和10多年近100家企业首席咨询顾问的实操经验,使其讲授的课程理
论联系实际、深入浅出,与学员产生强烈共鸣;有实例、有工具,操作性极强。
◇倡导快乐学习。授课语言风趣幽默、注重互动、鼓励参与,深受客户和学员的欢迎。 
-------------------------------------------------------------------------
◆主-办-单-位:中--培--信--息--网

◆标-准-费-用: ¥4500元/人(含指定内部教材、午餐、茶点费等)

◆报-名-咨-询:T E L: (0755) 6128 0152(深 圳)

◆报-名-咨-询:T E L: (0 2 1) 5108 3290(上 海)
-------------------------------------------------------------------------
                       [报  名  回  执  表] 

           F A X:(07 55) 6128 0153 或 (0 2 1) 5108 3296

我单位共____人报名参加2010年___月____日在□深圳、□上海举办的:“五步连贯”

股权激励法--留驻核心人才;

单位名称:_______________________________ 参会人数:_________人 

联系人:___________ 电 话:______________ 传 真:________________

参会费用:¥:______________元            邮 件:_________________

参 会 人:_______________________________________________________

付款方式:□1、现金    □2、转帐

预订项目:□是、□否 住宿(请选择打“√”)

     备注:请您把报名回执回传我司,��确保您报名无误,请您再次电话确认!

--- End Message ---

Reply via email to