[PHP] Object reference into variable?

2007-08-07 Thread GMail

Hello,

I have a question (what a surprise :-) )

I browsed the archives, but didn't find what I'm looking for.
I have an object instance stored in some variable (like $myobject). I want 
to save this instance into another variable (like $tempobject). I thought, 
this will be the way:

 $myobject = new MyObject();
 $tempobject = $myobject;
(or I tried this too:
 $tempobject = &$myobject)

None of them worked, like I cannot access methods in the object:
 $tempobject->Foo()
gives me an error: calling to method on a non-object variable.

How can I tell PHP that $tempobject is a class instance of MyObject, and 
that I can use it's methods?


Thanks,
SanTa

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Object reference into variable?

2007-08-07 Thread GMail
I forgot to tell you that I have to use PHP4.2 because of my web provider.
Anything besides of _clone?

SanTa

  - Original Message - 
  From: Hamza Saglam 
  To: "Sándor Tamás (GMail)" 
  Sent: Tuesday, August 07, 2007 10:49 AM
  Subject: Re: Object reference into variable?


  You may find the following article interesting. It talks about object 
  cloning, which I think what you are after...

  http://www.phpfreaks.com/phpmanual/page/language.oop5.cloning.html


  Regards,
  Hamza.


  ""Sándor Tamás (GMail)"" <[EMAIL PROTECTED]> wrote in message 
  news:[EMAIL PROTECTED]
  > Hello,
  >
  > I have a question (what a surprise :-) )
  >
  > I browsed the archives, but didn't find what I'm looking for.
  > I have an object instance stored in some variable (like $myobject). I want 
  > to save this instance into another variable (like $tempobject). I thought, 
  > this will be the way:
  >  $myobject = new MyObject();
  >  $tempobject = $myobject;
  > (or I tried this too:
  >  $tempobject = &$myobject)
  >
  > None of them worked, like I cannot access methods in the object:
  >  $tempobject->Foo()
  > gives me an error: calling to method on a non-object variable.
  >
  > How can I tell PHP that $tempobject is a class instance of MyObject, and 
  > that I can use it's methods?
  >
  > Thanks,
  > SanTa 




Re: [PHP] help with \n\r in strings

2006-12-29 Thread Manolet Gmail

2006/12/29, Arpad Ray <[EMAIL PROTECTED]>:

Angelo Zanetti wrote:
> So is there a way to test for \r\n? or what else can I use to delimit
> these two values (last column of row and first column of next row)?
>



mmm what about open the file with and hex editor?.. or mmm notepad++
have a option to see if is \r \n or \r\n

hopes helps


Since it's coming from a file, you might as well just read it with
file(), which will split each line into an array automatically. If it's
a CSV file, then fgetcsv() helps you out even more.

Arpad

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Regex Mixtake

2007-02-03 Thread Manolet Gmail

Hi, i have a problem using regex, i want to get all the text between " "

so i try this...

$subject = 'menu "Archer?",-,"Chief?",L_Menu2,"Big Mouth?",L_Menu3;';
if (ereg('"([^"]*)"', $subject, $regs)) {
print_r($regs);
}

but just return me:

Array
(
   [0] => "Archer?"
   [1] => Archer?
)

not return me Chief and Big Mounth

what is the problem?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Regex Mixtake

2007-02-03 Thread Manolet Gmail

2007/2/3, Steffen Ebermann <[EMAIL PROTECTED]>:

You have to use preg_match_all()

  if (preg_match_all("!\"(.+)\"!sU", $var, $match))




oh wow! works very well... but... i take 2 days reading about ereg ='(
there is no way to do this using ereg an not preg (PCRE)...

anyway, PCRE is better that ereg?




On Sat, Feb 03, 2007 at 12:36:59PM -0500, Manolet Gmail wrote:
> Hi, i have a problem using regex, i want to get all the text between " "
>
> so i try this...
>
> $subject = 'menu "Archer?",-,"Chief?",L_Menu2,"Big Mouth?",L_Menu3;';
> if (ereg('"([^"]*)"', $subject, $regs)) {
>   print_r($regs);
> }



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Regex Mixtake

2007-02-03 Thread Manolet Gmail

well thanks you too much, i will learn the preg sintax.

2007/2/3, Steffen Ebermann <[EMAIL PROTECTED]>:

I don't know, but http://php.net/manual/en/function.ereg.php says

  "Note: preg_match(), which uses a Perl-compatible regular expression
 syntax, is often a faster alternative to ereg()."


On Sat, Feb 03, 2007 at 01:58:50PM -0500, Manolet Gmail wrote:
> anyway, PCRE is better that ereg?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Image from a secure site

2007-03-08 Thread Manolet Gmail

hi, i install 4 IP cameras and i want to extract the images from their
web interface that is protected be a username and password (HTTP AUTH)
and show it into another system. so i do a function to connect to it
and get the image...

function subd($host,$port,$ownername,$passw,$request) {
 $sock = fsockopen($host,$port);
 if(!$sock) {
   print('Socket error');
   exit();
 }

 $authstr = "$ownername:$passw";
 $pass = base64_encode($authstr);
 $in = "GET $request\r\n";
 $in .= "HTTP/1.0\r\n";
 $in .= "Host:$host\r\n";
 $in .= "Authorization: Basic $pass\r\n";
 $in .= "\r\n";

 fputs($sock, $in);
 while (!feof($sock)) {
 $result .= fgets ($sock,128);
 }
 fclose( $sock );

 return $result;
}


and next i want to print it into the browser..


$request = "/IMAGE.JPG?cidx=20072261649239281";
$result = subd('contelec.sytes.net',2002,"invitado","invitado",$request);
header ('Content-type: image/jpeg');
imagejpeg($result);
exit();

but doesnt work if you want to check the cam you can go to
http://contelec.sytes.net:2002 the username is invitado and the
password is invitado.

please help me!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Image from a secure site

2007-03-13 Thread Manolet Gmail

2007/3/12, Richard Lynch <[EMAIL PROTECTED]>:


Instead of trying to re-invent the authentication wheel, just use
http://php.net/curl



wow!! Thanks you A LOOOT!!! thats amazing!!!





On Thu, March 8, 2007 4:51 pm, Manolet Gmail wrote:
> hi, i install 4 IP cameras and i want to extract the images from their
> web interface that is protected be a username and password (HTTP AUTH)
> and show it into another system. so i do a function to connect to it
> and get the image...
>
> function subd($host,$port,$ownername,$passw,$request) {
>   $sock = fsockopen($host,$port);
>   if(!$sock) {
> print('Socket error');
> exit();
>   }
>
>   $authstr = "$ownername:$passw";
>   $pass = base64_encode($authstr);
>   $in = "GET $request\r\n";
>   $in .= "HTTP/1.0\r\n";
>   $in .= "Host:$host\r\n";
>   $in .= "Authorization: Basic $pass\r\n";
>   $in .= "\r\n";
>
>   fputs($sock, $in);
>   while (!feof($sock)) {
>   $result .= fgets ($sock,128);
>   }
>   fclose( $sock );
>
>   return $result;
> }
>
>
> and next i want to print it into the browser..
>
>
> $request = "/IMAGE.JPG?cidx=20072261649239281";
> $result =
> subd('contelec.sytes.net',2002,"invitado","invitado",$request);
> header ('Content-type: image/jpeg');
> imagejpeg($result);
> exit();
>
> but doesnt work if you want to check the cam you can go to
> http://contelec.sytes.net:2002 the username is invitado and the
> password is invitado.
>
> please help me!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Image from a secure site

2007-03-13 Thread Manolet Gmail

Well  in case someone need to do this... this is the code.. very easy at all..

header ('Content-type: image/jpeg');
$ch 
=curl_init("http://contelec.sytes.net:2002/IMAGE.JPG?cidx=20072261649239281";);
curl_setopt($ch,CURLOPT_USERPWD,"invitado:invitado");
curl_exec($ch);
curl_close($ch);


2007/3/13, Manolet Gmail <[EMAIL PROTECTED]>:

2007/3/12, Richard Lynch <[EMAIL PROTECTED]>:
>
> Instead of trying to re-invent the authentication wheel, just use
> http://php.net/curl
>

wow!! Thanks you A LOOOT!!! thats amazing!!!



>
> On Thu, March 8, 2007 4:51 pm, Manolet Gmail wrote:
> > hi, i install 4 IP cameras and i want to extract the images from their
> > web interface that is protected be a username and password (HTTP AUTH)
> > and show it into another system. so i do a function to connect to it
> > and get the image...
> >
> > function subd($host,$port,$ownername,$passw,$request) {
> >   $sock = fsockopen($host,$port);
> >   if(!$sock) {
> > print('Socket error');
> > exit();
> >   }
> >
> >   $authstr = "$ownername:$passw";
> >   $pass = base64_encode($authstr);
> >   $in = "GET $request\r\n";
> >   $in .= "HTTP/1.0\r\n";
> >   $in .= "Host:$host\r\n";
> >   $in .= "Authorization: Basic $pass\r\n";
> >   $in .= "\r\n";
> >
> >   fputs($sock, $in);
> >   while (!feof($sock)) {
> >   $result .= fgets ($sock,128);
> >   }
> >   fclose( $sock );
> >
> >   return $result;
> > }
> >
> >
> > and next i want to print it into the browser..
> >
> >
> > $request = "/IMAGE.JPG?cidx=20072261649239281";
> > $result =
> > subd('contelec.sytes.net',2002,"invitado","invitado",$request);
> > header ('Content-type: image/jpeg');
> > imagejpeg($result);
> > exit();
> >
> > but doesnt work if you want to check the cam you can go to
> > http://contelec.sytes.net:2002 the username is invitado and the
> > password is invitado.
> >
> > please help me!
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some starving artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?
>
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] HTDIGEST FILE FORMAT

2007-04-01 Thread Manolet Gmail

hi, i want a php script to create htdigest file...

the correct file is:
username:admin
digest:trac
pass:admin

admin:trac:71ea86385b35d5e2575b0baec1904ded

i try to do it on php with this:

echo "admin:trac:".md5("admin");

but i receive this:

admin:trac:21232f297a57a5a743894a0e4a801fc3

how is the htdigest format?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] exec dont work for svn

2007-05-28 Thread Manolet Gmail

hi, i want to do a svn update (subversion) from php using exec (or system)

now, this works:

exec("ls; pwd",$out);
foreach($out as $line)echo"$line\n";

and this also works and print me the help from subversion:

exec("svn help",$out);
foreach($out as $line)echo"$line\n";

but this doesnt work:

exec("svn update",$out);
foreach($out as $line)echo"$line\n";

dont print anything... dont update the files, pwd returns me the
correct path...

any ideas? im using cpanel... php5 and fedora 4 php runs as nobody...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] exec dont work for svn

2007-05-29 Thread Manolet Gmail

2007/5/28, Greg Donald <[EMAIL PROTECTED]>:

On 5/28/07, Manolet Gmail <[EMAIL PROTECTED]> wrote:
> but this doesnt work:
>
> exec("svn update",$out);
> foreach($out as $line)echo"$line\n";
>
> dont print anything... dont update the files

Is it possible you need to provide some type of authentication?  `svn
update` may be asking for input your exec call isn't providing.


well, i have  error reporting (E ALL) and dont give me any error, also
i try with

svn update --non-interactive --username user --password pass

and again... nothing appears. Also if the svn update ask for a
password  why php dont show it?, or why i dont receive a maximum
ececution time of script error?.

the script run instantly btw,..




--
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] exec dont work for svn

2007-05-29 Thread Manolet Gmail

Hi, thanks petter, now im getting this error...

svn: Can't check path '/root/.svn': Permission denied

using this:
$cmd = "svn up";
$cmd .= " --username $user --password $pass --non-interactive --revision 
$rev";
$cmd .= " --no-auth-cache --config-dir ~/.svn/ 2>&1";

i try with --config-dir /tmp/   with $_SERVER['document_root'] but
always return me the same error, any idea?


2007/5/29, Peter Lauri <[EMAIL PROTECTED]>:

Hi,

In many apps the messages comes as STDERR, so try:

exec("svn update 2>&1", $out);

Best regards,
Peter Lauri

www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free

> -Original Message-
> From: Manolet Gmail [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 29, 2007 5:45 PM
> To: PHP List
> Subject: [PHP] exec dont work for svn
>
> 2007/5/28, Greg Donald <[EMAIL PROTECTED]>:
> > On 5/28/07, Manolet Gmail <[EMAIL PROTECTED]> wrote:
> > > but this doesnt work:
> > >
> > > exec("svn update",$out);
> > > foreach($out as $line)echo"$line\n";
> > >
> > > dont print anything... dont update the files
> >
> > Is it possible you need to provide some type of authentication?  `svn
> > update` may be asking for input your exec call isn't providing.
>
> well, i have  error reporting (E ALL) and dont give me any error, also
> i try with
>
> svn update --non-interactive --username user --password pass
>
> and again... nothing appears. Also if the svn update ask for a
> password  why php dont show it?, or why i dont receive a maximum
> ececution time of script error?.
>
> the script run instantly btw,..
>
> >
> >
> > --
> > Greg Donald
> > http://destiney.com/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] exec dont work for svn

2007-05-30 Thread Manolet Gmail

2007/5/30, Richard Lynch <[EMAIL PROTECTED]>:



On Tue, May 29, 2007 10:44 am, Manolet Gmail wrote:
> 2007/5/28, Greg Donald <[EMAIL PROTECTED]>:
>> On 5/28/07, Manolet Gmail <[EMAIL PROTECTED]> wrote:
>> > but this doesnt work:
>> >
>> > exec("svn update",$out);

exec("svn update", $out, $error);
if ($error) echo "OS Error: $error.  Use perror $error in shell to get
message";


give me error 1:
 OS error code   1:  Operation not permitted

also, the checkout was did by other user.  but i do chmod -R 777 * as root.

so what i can do ?



>> > foreach($out as $line)echo"$line\n";
>> >
>> > dont print anything... dont update the files
>>
>> Is it possible you need to provide some type of authentication?
>> `svn
>> update` may be asking for input your exec call isn't providing.
>
> well, i have  error reporting (E ALL) and dont give me any error, also
> i try with
>
> svn update --non-interactive --username user --password pass
>
> and again... nothing appears. Also if the svn update ask for a
> password  why php dont show it?, or why i dont receive a maximum
> ececution time of script error?.
>
> the script run instantly btw,..
>
>>
>>
>> --
>> Greg Donald
>> http://destiney.com/
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] channels attribute value returns wrong

2006-10-31 Thread dhatri gmail

Hello,

using function getimagesize();

I am trying to get channels attribute value of image, it returns 3 for 
cmyk image actually it should return 4, can you tell me why it happens so?


regds.
dmt

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Mailto() - Google now displaying HTML as Plain Text

2012-04-29 Thread Terry Ally (Gmail)
Hi all,

I have been using a mailto() script for the last three years and from April
25, 2012 incoming HTML email in Goggle mail is displaying as Plain Text.
 Something clearly changed with Google. Perhaps there is some change I need
to make with my script??

// First set up some variables for recipient, subject, and date/time received
$to = $sendto;  // Recipient
$subject = "Message received via XX website";  // Subject
$oh = (int) date ("Z") / 3600;  // time offset to GMT
$date = date("d M Y g:i:s a ", mktime (date ("H") - $oh)). " GMT"; //
Date and time in the form -mm-dd hh:mm:ss


// Set up conditionals for optional fields
$addr1 = $_POST['addr1'];
$addr2 = $_POST['addr2'];
$city = $_POST['city'];
$country = $_POST['country'];
$postalcode = $_POST['postalcode'];

// Compose body of email
$message = "Following is a message received for ".$recipient. "
sent via XX website on ".$date."";
$message .= "From: ".$n." (".$email.")";

if (($addr1) && (! $addr2)) {
$message .=  "Address: ".$addr1."";
} elseif (($addr1) && ($addr2)) {
$message .=  "Address: ".$addr1.", ".$addr2."";
} else {
$message .=  "Address: None provided";}

if ($city) {
$message .= "City: ".$city."";
} else { }

if (($country) && (! $postalcode)) {
$message .= "Country: ".$country."";
} elseif($country && $postalcode) {
$message .= "Country: ".$country." ".$postalcode."";
} else { }

$message .= "Message: ".$m."";

// To send HTML mail, the Content-type header must be set
$headers  = 'From: '.$n.'<'.$email . ">\r\n" ;
$headers .= 'Reply-To: '.$email . "\r\n";
$headers .= 'cc: XXX ' . "\r\n";
$headers .= 'Bcc: XXX ' . "\r\n";

// Additional headers
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();


// send email
mail($to, $subject, $message, $headers);


Thanks
-- 
*Terry Ally*


Re: [PHP] PHP & Database Problems

2012-05-02 Thread Terry Ally (Gmail)
Dear Ethan,

It would be useful to see what code you are using.

The syntax is:

UPDATE table_name
SET column1=value, column2=value2,...
WHERE some_column=some_value


The data that you are required to enter is for Intake3. I am assuming that
the only change is the History and/or Phone that you need to update since
the Site, MedRec, Fname, Lname, Height and Sex should remain the same.
Therefore I imagine the code should be something like


mysql_query("UPDATE  Intake3  SET History='Has been convinced by his
friends that he is obese. Normal BMI = 23', Phone='325 563-4178'
WHERE MedRec='1' LIMIT 1");


Having said that I notice that you have two primary keys in Intake3. Not
aware that a table can carry two.

Terry

On 2 May 2012 19:53, Ethan Rosenberg  wrote:

>  have a database
>
> mysql> describe Intake3;
> ++-+--**+-+-+---+
> | Field  | Type| Null | Key | Default | Extra |
> ++-+--**+-+-+---+
> | Site   | varchar(6)  | NO   | PRI | |   |
> | MedRec | int(6)  | NO   | PRI | NULL|   |
> | Fname  | varchar(15) | YES  | | NULL|   |
> | Lname  | varchar(30) | YES  | | NULL|   |
> | Phone  | varchar(30) | YES  | | NULL|   |
> | Height | int(4)  | YES  | | NULL|   |
> | Sex| char(7) | YES  | | NULL|   |
> | Hx | text| YES  | | NULL|   |
> ++-+--**+-+-+---+
> 8 rows in set (0.00 sec)
>
> mysql> describe Visit3;
> ++--+-**-+-+-+**+
> | Field  | Type | Null | Key | Default | Extra  |
> ++--+-**-+-+-+**+
> | Indx   | int(4)   | NO   | PRI | NULL| auto_increment |
> | Site   | varchar(6)   | YES  | | NULL||
> | MedRec | int(6)   | YES  | | NULL||
> | Notes  | text | YES  | | NULL||
> | Weight | int(4)   | YES  | | NULL||
> | BMI| decimal(3,1) | YES  | | NULL||
> | Date   | date | YES  | | NULL||
> ++--+-**-+-+-+**+
>
> and a program to enter and extract data.
>
> I can easily extract data from the database. However, if I try to enter
> data, it goes into the incorrect record.  Following are some screenshots.
>  The program is attached.  [pardon the comical names.  This is a test, and
> any resemblance to true names is not intentional]
>
> Let us say that I wish to deal with Medical Record 1:
>
>
> This it data from Intake3:
> Site Medical Record First Name Last Name Phone Height Sex History
> AA 1 David Dummy 845 365-1456 66 Male c/o obesity. Various treatments
> w/o success
>
> This is data from Visit3:
> Index Site Medical Record Notes Weight BMI Date
> 2322 AA 1 Second Visit. 170 27.4 2010-01-20
> 2326 AA 1 Third visit. Small progress, but pt is very happy. 165 26.6
> 2010-02-01
>
>
> I then request to enter additional data:
>
> Site Medical Record First Name Last Name Phone Height Sex History
> AA 10003 Stupid Fool 325 563-4178 65 Male Has been convinced by his
> friends that he is obese. Normal BMI = 23.
> Index Site Medical Record Notes Weight BMI Date
>
> Notice that it is entered into record 10003
>
> The data is "First Try"
>
> Index Site Medical Record Notes Weight BMI Date
> 2590 AA 10003 First Try 189 31.4 02 May 2012
>
> Help and advice, please.
>
> Thanks.
>
> Ethan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] date conversion/extraction issues

2012-05-03 Thread Terry Ally (Gmail)
Haluk,

After you retrieve the date from the database you still have to convert it
from a string to time and then to a date. Try:




Terry

On 2 May 2012 22:36, Haluk Karamete  wrote:

> This is my code and the output is right after that...
>
> $PDate = $row['PDate'];
> //row is tapping into ms-sql date field.
> //and the ms-sql data field has a value like this for the PDate;
> //07/12/2001
> $PDate = $PDate->date;
> echo "[", $PDate , "]";
> echo "[", var_dump($row['PDate']) , "]";
> echo "[", serialize($row['PDate']) , "]";
> the output is as follows. And my question is embedded in the output.
>
> []  ??? WHY IS THIS BLANK? WHY IS THIS NOT 2001-12-07 00:00:00?
>
> [object(DateTime)#3 (3) { ["date"]=> string(19) "2001-12-07 00:00:00"
> ["timezone_type"]=> int(3) ["timezone"]=> string(19)
> "America/Los_Angeles" } ]
>
> [O:8:"DateTime":3:{s:4:"date";s:19:"2001-12-07
>
> 00:00:00";s:13:"timezone_type";i:3;s:8:"timezone";s:19:"America/Los_Angeles";}]
>
> if I were to directly insert the $row['date']  ms-sql value into mysq,
> I get this error;
> Catchable fatal error: Object of class DateTime could not be converted
> to string in sql.php on line 379
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] Retrieve pages from an ASP driven site

2012-05-03 Thread Terry Ally (Gmail)
Tom,

Here is how you would paginate in PHP.

//
// Number of records to show per page:
$display = 4;
// Determine how many records there are.
if (isset($_GET['np'])) {
$num_pages = $_GET['np'];
} else {
$query = "SELECT * FROM mytable";
$query_result = mysql_query ($query) or die (mysql_error());
$num_records = @mysql_num_rows ($query_result);
 if ($num_records > $display) {
$num_pages = ceil ($num_records/$display);
} else {
$num_pages = 1;
}
}
 // Determine where in the database to start returning results.
if (isset($_GET['s'])) {
$start = $_GET['s'];
} else {
$start = 0;
}


// Number of records to show per page:
$display = 4;
// Determine how many records there are.
if (isset($_GET['np'])) {
$num_pages = $_GET['np'];
} else {
$query3 = "SELECT * FROM mytable";
$query_result = mysql_query ($query3) or die (mysql_error());
$num_records = @mysql_num_rows ($query_result);
 if ($num_records > $display) {
$num_pages = ceil ($num_records/$display);
} else {
$num_pages = 1;
}
}
 // Determine where in the database to start returning results.
if (isset($_GET['s'])) {
$start = $_GET['s'];
} else {
$start = 0;
}
//




On 3 May 2012 05:37, EPA WC  wrote:

> Hi List,
>
> I am trying to write a crawler to go through web pages at
> http://www.freebookspot.es/CompactDefault.aspx?Keyword=. But I am not
> quite familiar with how asp uses _doPostBack function with the "next"
> button below the book list to advance to the next page. I hope someone
> who knows ASP well can help out here. I need to know how to retrieve
> next page with PHP code.
>
> Kind regards,
> Tom
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] PHP Mailto() - Google now displaying HTML as Plain Text

2012-05-03 Thread Terry Ally (Gmail)
Hi all,

This question is now closed.

There is nothing wrong with my script.

It was an error by Google when they switched over to the new-look email and
have since rectified the issue and all is back to normal.

Thanks to all who have responded.

Terry



On 3 May 2012 21:05, Gerardo Benitez  wrote:

> Do you know if the mailto script allow set headers?
>
> Probably you must set a html header, something like this
> $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
>
>
> Regards,
> Gerardo.
>
> On Tue, May 1, 2012 at 5:14 PM, Marco Behnke  wrote:
>
> >
> >
> > Am 29.04.2012 22:31, schrieb Terry Ally (Gmail):
> >
> >> Hi all,
> >>
> >> I have been using a mailto() script for the last three years and from
> >> April
> >> 25, 2012 incoming HTML email in Goggle mail is displaying as Plain Text.
> >>  Something clearly changed with Google. Perhaps there is some change I
> >> need
> >> to make with my script??
> >>
> >> $message .= "Message:<**blockquote>  ".$m."";
> >>
> >>
> > As far as I can see your main html tags are missing?
> >
> > $message = '' . $message . '';
> >
> >
> > --
> > Marco Behnke
> > Dipl. Informatiker (FH), SAE Audio Engineer
> > Zend Certified Engineer PHP 5.3
> >
> > Tel.: 0174 / 9722336
> > e-Mail: ma...@behnke.biz
> >
> > Softwaretechnik Behnke
> > Heinrich-Heine-Str. 7D
> > 21218 Seevetal
> >
> > http://www.behnke.biz
> >
> >
> >
>
>
> --
> Gerardo Benitez
> -
> Programador Web Freelance
>



-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] Calculating driving distance between UK postcodes

2012-05-04 Thread Terry Ally (Gmail)
Google works in Javascript extensively - not a language with which I
have in-depth experience hence my reason for asking for PHP solution.

For example the following will get me a JSON output with the distance in
Kms and time. I don't know how to get PHP to read this information and
extract just the distance. I need the distance so that I can calculate cost
of a trip.

http://maps.googleapis.com/maps/api/distancematrix/json"; method="get">




Get
Distance






On 4 May 2012 15:08, David OBrien  wrote:

> Google is still your friend
>
> On Fri, May 4, 2012 at 9:36 AM, Terry Ally (Gmail) wrote:
>
>> Does anyone have a working/example PHP script that calculates driving
>> distances between UK postcodes that they can share?
>>
>> Thanks
>>
>> --
>> *Terry Ally*
>>
>> Twitter.com/terryally
>> Facebook.com/terryally
>> ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
>> To print or not to print this email is the environmentally-searching
>> question!
>> Which has the highest ecological cost? A sheet of paper or constantly
>> switching on your computer and connecting to the Internet to read your
>> email?
>>
>
>
> http://stackoverflow.com/questions/2296087/using-php-and-google-maps-api-to-work-out-distance-between-2-post-codes-uk




-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] Date comparison going wrong, wrong, wrong

2012-11-11 Thread Terry Ally (Gmail)
Hi Shiplu and Stuart,

Comparing timestamps was my first option. I've reinstated it. Have a look
at http://www.lakesidesurrey.co.uk/test.php (show_source included) and you
will see that PHP is still outputting the wrong thing.

I just can't figure out what's wrong.

Terry

On 11 November 2012 18:48, shiplu  wrote:

> You can always use timestamp which is integer.
>
> $todaydate = time();
> $showenddate = strtotime($showsRecord['end_date']);
>
>
> On Mon, Nov 12, 2012 at 12:30 AM, Terry Ally (Gmail) 
> wrote:
>
>> Hi all,
>>
>> I am having a problem with comparing time. I am using the following:
>>
>> $todaydate = date("D, M jS, Y g:i:s a");
>> $showenddate = date("D, M jS, Y g:i:s a",
>> strtotime($showsRecord['end_date']));
>>
>> if ($todaydate > $showenddate):
>> echo "The date of the show has not yet arrived";
>> else:
>> echo "The show has ended";
>> endif;
>>
>> The problem that I am encountering is that PHP is rendering the reverse of
>> the equation. For example:
>>
>> If today's date is *11 Nov 2012* and the show's end date is *18 Nov 2012*,
>> the message that I am getting is *the show has ended* which is wrong. A
>>
>> test example is at http://www.lakesidesurrey.co.uk/test.php.
>>
>> You can also me what I am doing wrong?
>>
>> Thanks
>> Terry
>>
>
>
>
> --
> Shiplu.Mokadd.im
> ImgSign.com | A dynamic signature machine
> Innovation distinguishes between follower and leader
>
>


-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] Date comparison going wrong, wrong, wrong

2012-11-11 Thread Terry Ally (Gmail)
Stuart,

I reversed it as you suggested and every future show is displaying as
having ended.

Terry

On 11 November 2012 19:11, Stuart Dallas  wrote:

> Please include the list when replying.
>
> On 11 Nov 2012, at 19:08, "Terry Ally (Gmail)" 
> wrote:
>
> > What I want is the reverse.
> >
> > I want that if people attempt to access the show page after the show has
> ended that it triggers an error which takes it to another page. The actual
> conditional statement is as follows (which I will replace with timestamp):
> >
> >   $todaydate = date("D, M jS, Y g:i:s a");
> >   $showenddate = date("D, M jS, Y g:i:s a",
> strtotime($showsRecord['end_date']));
> > if ($todaydate > $showenddate) {
> >   header( 'Location: eventdetails_error.php' ) ;
> >   }
>
> This is what you have:
>
> if ($todaydate > $showenddate):
> echo "The date of the show has not yet arrived";
> else:
> echo "The show has ended";
> endif;
>
> That says: if the current time is later than the end date of the show,
> tell them the date of the show hasn't arrived yet.
>
> What you mean is: if the current time is later than the end of the show,
> tell them the show has ended.
>
> if ($todaydate < $showenddate):
> echo "The date of the show has not yet arrived";
> else:
> echo "The show has ended";
> endif;
>
> It's a simple logic error.
>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
>
> > On 11 November 2012 19:04, Stuart Dallas  wrote:
> > On 11 Nov 2012, at 19:00, "Terry Ally (Gmail)" 
> wrote:
> >
> > > Hi Shiplu and Stuart,
> > >
> > > Comparing timestamps was my first option. I've reinstated it. Have a
> look
> > > at http://www.lakesidesurrey.co.uk/test.php (show_source included)
> and you
> > > will see that PHP is still outputting the wrong thing.
> > >
> > > I just can't figure out what's wrong.
> >
> > Your comparison is backwards:
> >
> > if ($todaydate > $showenddate):
> >
> > should be
> >
> > if ($todaydate < $showenddate):
> >
> > -Stuart
> >
> > --
> > Stuart Dallas
> > 3ft9 Ltd
> > http://3ft9.com/
> >
> > > On 11 November 2012 18:48, shiplu  wrote:
> > >
> > >> You can always use timestamp which is integer.
> > >>
> > >> $todaydate = time();
> > >> $showenddate = strtotime($showsRecord['end_date']);
> > >>
> > >>
> > >> On Mon, Nov 12, 2012 at 12:30 AM, Terry Ally (Gmail) <
> terrya...@gmail.com>wrote:
> > >>
> > >>> Hi all,
> > >>>
> > >>> I am having a problem with comparing time. I am using the following:
> > >>>
> > >>> $todaydate = date("D, M jS, Y g:i:s a");
> > >>> $showenddate = date("D, M jS, Y g:i:s a",
> > >>> strtotime($showsRecord['end_date']));
> > >>>
> > >>> if ($todaydate > $showenddate):
> > >>>echo "The date of the show has not yet arrived";
> > >>> else:
> > >>>echo "The show has ended";
> > >>> endif;
> > >>>
> > >>> The problem that I am encountering is that PHP is rendering the
> reverse of
> > >>> the equation. For example:
> > >>>
> > >>> If today's date is *11 Nov 2012* and the show's end date is *18 Nov
> 2012*,
> > >>> the message that I am getting is *the show has ended* which is
> wrong. A
> > >>>
> > >>> test example is at http://www.lakesidesurrey.co.uk/test.php.
> > >>>
> > >>> You can also me what I am doing wrong?
> > >>>
> > >>> Thanks
> > >>> Terry
> > >>>
> > >>
> > >>
> > >>
> > >> --
> > >> Shiplu.Mokadd.im
> > >> ImgSign.com | A dynamic signature machine
> > >> Innovation distinguishes between follower and leader
> > >>
> > >>
> > >
> > >
> > > --
> > > *Terry Ally*
> > > Twitter.com/terryally
> > > Facebook.com/terryally
> > > ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
> > > To print or not to print this email is the environmentally-searching
> > > question!
> > > Which has the highest ecological cost? A sheet of paper or constantly
> > > switching on your computer and connecting to the Internet to read your
> > > email?
> >
> >
> >
> >
> > --
> > Terry Ally
> > Twitter.com/terryally
> > Facebook.com/terryally
> > ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
> > To print or not to print this email is the environmentally-searching
> question!
> > Which has the highest ecological cost? A sheet of paper or constantly
> switching on your computer and connecting to the Internet to read your
> email?
> >
>
>


-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] Date comparison going wrong, wrong, wrong

2012-11-20 Thread Terry Ally (Gmail)
Dear Duken,

Many thanks for the solution. It worked!

And thanks to everyone else who pitched in with various solutions.

Regards
Terry

On 12 November 2012 10:06, Duken Marga  wrote:

> Try this:
>
> $todaydate = strtotime(date("D, M jS, Y g:i:s a"));
> $showenddate = strtotime(date("D, M jS, Y g:i:s a",
> strtotime($showsRecord['end_date'])));
>
>
> if ($todaydate < $showenddate):
> echo "The date of the show has not yet arrived";
> else:
> echo "The show has ended";
> endif;
>
> You must convert both $todaydate and $showendate with strtotime()
> function, then you can compare them.
>
> On Mon, Nov 12, 2012 at 1:30 AM, Terry Ally (Gmail) 
> wrote:
>
>> Hi all,
>>
>> I am having a problem with comparing time. I am using the following:
>>
>> $todaydate = date("D, M jS, Y g:i:s a");
>> $showenddate = date("D, M jS, Y g:i:s a",
>> strtotime($showsRecord['end_date']));
>>
>> if ($todaydate > $showenddate):
>> echo "The date of the show has not yet arrived";
>> else:
>> echo "The show has ended";
>> endif;
>>
>> The problem that I am encountering is that PHP is rendering the reverse of
>> the equation. For example:
>>
>> If today's date is *11 Nov 2012* and the show's end date is *18 Nov 2012*,
>> the message that I am getting is *the show has ended* which is wrong. A
>>
>> test example is at http://www.lakesidesurrey.co.uk/test.php.
>>
>> You can also me what I am doing wrong?
>>
>> Thanks
>> Terry
>>
>
>
>
> --
> Duken Marga
>
>
>


-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] Date comparison going wrong, wrong, wrong

2012-11-20 Thread Terry Ally (Gmail)
It's a nice shortcut Jim. Never considered that.

Thanks.

On 20 November 2012 21:03, Jim Lucas  wrote:

> On 11/12/2012 02:06 AM, Duken Marga wrote:
>
>> Try this:
>>
>> $todaydate = strtotime(date("D, M jS, Y g:i:s a"));
>> $showenddate = strtotime(date("D, M jS, Y g:i:s a",
>> strtotime($showsRecord['end_**date'])));
>>
>
> Won't this give you the same results without the extra conversion steps?
>
> $todaydate = date("U");
>
> $showenddate = strtotime($showsRecord['end_**date']);
>
>
>> if ($todaydate<  $showenddate):
>>  echo "The date of the show has not yet arrived";
>> else:
>>  echo "The show has ended";
>> endif;
>>
>> You must convert both $todaydate and $showendate with strtotime()
>> function,
>> then you can compare them.
>>
>> On Mon, Nov 12, 2012 at 1:30 AM, Terry Ally (Gmail)*
>> *wrote:
>>
>>  Hi all,
>>>
>>> I am having a problem with comparing time. I am using the following:
>>>
>>> $todaydate = date("D, M jS, Y g:i:s a");
>>> $showenddate = date("D, M jS, Y g:i:s a",
>>> strtotime($showsRecord['end_**date']));
>>>
>>> if ($todaydate>  $showenddate):
>>>  echo "The date of the show has not yet arrived";
>>> else:
>>>  echo "The show has ended";
>>> endif;
>>>
>>> The problem that I am encountering is that PHP is rendering the reverse
>>> of
>>> the equation. For example:
>>>
>>> If today's date is *11 Nov 2012* and the show's end date is *18 Nov
>>> 2012*,
>>> the message that I am getting is *the show has ended* which is wrong. A
>>> test example is at 
>>> http://www.lakesidesurrey.co.**uk/test.php<http://www.lakesidesurrey.co.uk/test.php>
>>> .
>>>
>>> You can also me what I am doing wrong?
>>>
>>> Thanks
>>> Terry
>>>
>>>
>>
>>
>>
>
> --
> Jim Lucas
>
> http://www.cmsws.com/
> http://www.cmsws.com/examples/
>



-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] Re: Open form in new window

2013-03-04 Thread Terry Ally (Gmail)
You could echo HTML code e.g.


Number: 
*Submit*


or include it as one of your form attributes:

**
  First name: 
  Last name: 
  



On 4 March 2013 07:16, Maciek Sokolewicz wrote:

> On 4-3-2013 6:44, John Taylor-Johnston wrote:
>
>> I have many different submit button.
>> 
>> 
>>
>> When php processes value="Enter Data", I would like to open a new
>> window, but only if I click this one.
>>
>> Possible? I knw ther is an HTML target="" thingy. Can PHP do anything
>> magic?
>>
>>  No, it can't. PHP is a *serverside* language, while opening a new window
> is fully *clientside*. You could, after recieving the form submission, send
> back a redirect which opens in a new window; but far easier would be to use
> javascript which would open a new window on submission instead.
>
> PHP is definitly the wrong choice for things like opening browser windows.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] Re: Open form in new window

2013-03-04 Thread Terry Ally (Gmail)
I was using an example and NOT intended to show ASP.



On 4 March 2013 08:35, Maciek Sokolewicz wrote:

> On 4 March 2013 09:32, Terry Ally (Gmail)  wrote:
> > You could echo HTML code e.g.
> Which is still purely HTML and has nothing whatsoever to do with PHP.
>
> >
> > 
> > Number: 
> > Submit
> > 
> >
> > or include it as one of your form attributes:
> >
> > 
> >   First name: 
> >   Last name: 
> >   
> > 
> Again, pure HTML, and no PHP involved. Specifically, the (asp??) page
> called in the form action handler will never even be aware of the fact
> that the page was opened in a new window, or at least was supposed to.
>



-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] webform spam prevention

2013-04-04 Thread Terry Ally (Gmail)
I am running captcha but the problem that I am having is that fly-by-night
SEO marketeers are using the form to send marketing messages anyway. We get
so many spam messages that I put up in red letters on the form that we do
not want cold-calling SEO marketing messages. Since that message there has
been a significant reduction in emails from legitimate SEO companies.

However there is an upsurge in fly-by-night individuals who are all using
Gmail addresses and originating in the USA. It seems as though someone is
selling them a database of websites to contact.

I wish there was a way of dealing with these people who evidently cannot
read. Is there a technological solution?




On 4 April 2013 17:28, Maciek Sokolewicz  wrote:

> On 4-4-2013 14:27, tamouse mailing lists wrote:
>
>> On Apr 4, 2013 3:57 AM, "Ashley Sheridan" 
>> wrote:
>>
>>>
>>> One type I've seen (and use myself) which is gaining traction is that of
>>>
>> asking for a human type of response to a question, or have them perform a
>> simple mathematical problem, where the numbers are replaced with something
>> else.
>>
>>>
>>>
>> Those can be great. The sticky part seems to be i18n and common user
>> experience to answer the question, but this seem much easier to work with
>> then throwing something horrible at your users.
>>
>>
> Still, questions like "Does the sun rise in the morning or evening?" or
> "Is the sky usually blue or red?" should be answerable by pretty much any
> human capable of understanding at least very basic things. I'm pretty sure
> that even if you have a severely reduced mental capacity, you can still
> answer these types of questions. And if you can't, you usually are in the
> wrong place anyway.
>
> - Tul
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?