php-general Digest 27 Jun 2010 11:20:52 -0000 Issue 6818
Topics (messages 306456 through 306459):
Re: Another parse problem
306456 by: tedd
Problem with SOAP and authentication? SoapFault exception: [HTTP] Unauthorized
306457 by: robert mena
mysql case statement
306458 by: Tanel Tammik
Modifying Existing Text File From PHP Is Not Working
306459 by: Alice Wei
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 ---
At 10:16 PM -0400 6/16/10, Daniel Brown wrote:
I'm hoping Tedd will share his as well.
Daniel:
I'm embarrassed to show it -- it's not as slick and condensed as
your's and Rob's
http://www.webbytedd.com/b3/parse-domain-collective/
Please be kind.
However, my code was to do something specific in my mind, namely to
pull out the domains that have specific TLD the user wants, reduce
the domains to their basic form (no sub domains), strip-out any
possible gremlins from the input text, and return no duplicates. I am
NOT saying that yours did anything different -- I'm just saying that
was *my* intent.
Cheers,
tedd
PS: I'm back from a long stretch of seminars on "Asset Protection". I
guess that my asset needs protecting. In any event, I now know more
about the relationships between Corporation, LLC, LP, Trust, and
other such fun matters than anyone should know.
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
Hi,
I am trying to access a webservice using php's soapclient but I keep getting
the error SoapFault exception: [HTTP] Unauthorized
If I try using a web browser I can authenticate using the same credentials
used by the php code.
I've searched but the only mention that I found led to a 'won't fix' bug
registered to php 5.1.6. I am using 5.2.10.
Any ideas of what may be causing this? Is there a workaround?
Regards.
--- End Message ---
--- Begin Message ---
Hello,
how to select only if value is present?
$query = $db->query("select menus.id, menus.name,
case
when panels.id is not null then '1'
end as hiddenpanel
from " . \DB_MENUS . " as menus
left join " . \DB_HIDDENPANELS . " as panels on (menus.id =
panels.menu_id)
where menus.id='" . (int)$id . "'
");
i would like to select hiddenpanel only if there is a corresponding value in
DB_HIDDENPANELS. At the moment i get NULL if there is no corresponding value
in HIDDENPANELS table!
Br
Tanel
--- End Message ---
--- Begin Message ---
Hi,
I have the code as in the following:
<?php
$name= "Test";
$phone= "123-456-7890";
$email = "myem...@mymail.com";
$comments = "Test Only";
$string = "<message>\n<name>" . $name . "</name>\n<phone>" . $phone .
"</phone>\n<email>".
$email . "</email>\n<comments>" . $comments .
"</comments>\n</message>";
//If file exists. append, otherwise create
$file = "messages.xml";
$fh = fopen($file,"a");
$lines = file($file);
//Output a line of the file until the end is reached
foreach($lines as $line) {
if (trim($line) == "<messages>") {
$line = "<messages>" . $string; // If string, change it.
echo $line . "<br>";
fwrite($fh, $line);
}
else {
// If not don't write anything
echo $line . "<br>";
}
fclose($file); // Close the file.
}
?>
For some reason, it is writing out the lines, but it is not f-writing to the
file. Here is the file that is meant to be edited:
<messages>
<message>
<name>Me</name>
<phone>123-456-7890</phone>
<email>t...@test.com</email>
<comments>This is my message board!</comments>
</message>
</messages>
Have I missed something here? How come the file cannot perform fwrite actions?
Thanks for your help.
_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
--- End Message ---