php-general Digest 6 Nov 2006 19:59:24 -0000 Issue 4444

Topics (messages 244249 through 244266):

Re: WAP?
        244249 by: clive
        244250 by: clive

What is 'object class introspection '?
        244251 by: John.H

Re: PHP Zip Question
        244252 by: Matt Street

Help! PRINTF Function
        244253 by: ngoc.truong-torche.vd.ch
        244254 by: Dotan Cohen
        244258 by: Roman Neuhauser

Re: PHP in Kenya
        244255 by: tedd
        244257 by: clive

Re: Sorting MySQL queries
        244256 by: tedd
        244265 by: Curt Zirzow

Re: Protecting Streaming Audio
        244259 by: Ed Lazor

Freelance php project... clone a website's functionality [0T]
        244260 by: Ryan A

fwrite() timeout
        244261 by: Martin Cetkovsky
        244264 by: Martin Cetkovsky

Re: Microsoft Partners With Zend
        244262 by: Martin Cetkovsky
        244263 by: Martin Cetkovsky

Pulling Data From a Page
        244266 by: Phillip Baker

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

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


----------------------------------------------------------------------
--- Begin Message ---
Richard Lynch wrote:
On Fri, November 3, 2006 3:14 am, clive wrote:


The closest I can come is with a deck whose entire contents spew out
at once to a handset:

Is there any reason why you insist on using WAP 1.X?

clive

--- End Message ---
--- Begin Message ---
Richard Lynch wrote:
On Fri, November 3, 2006 3:14 am, clive wrote:


http://www.acousticdemo.com/nationalsystems/pizzahut.com/wap/index.wml

tried the url on my nokia 6230i and get your first card displaying correctly.



--- End Message ---
--- Begin Message ---
It is a shortage of PHP4?Right?

--- End Message ---
--- Begin Message ---
Thanks for the response, I decided that it was easier to unpack the zip 
during the upload process and then delete the zip. I can then indicate 
which files I want to zip up and this works (opening the zip on the 
server), but, and it's a big but, when the zip is downloaded to the 
users machine it is being corrupted! 

To force the download I use: 

header('Content-type: application/zip'); 
header('Content-Disposition:  attachment; filename='.$tutorzipfile); 
readfile($filename); 

Which correctly gives me: 

Content-Type: application/zip 
Content-disposition: attachment; filename=tutorzipfile.zip 

when viewing the LiveHTTPHeaders extension in firefox. 

However, when I view the zip file that is downloaded to my machine, in 
Textpad, php has appended the directory information of the files I'm 
zipping up onto the front of the zip file, so it no longer starts PK!!! 

Anyone any ideas??? 

Thanks in advance 

Matt

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

The following examples don't work
                                                                       
                                                                       
                                                                       
  printf("[%10s]\n",    $s); // justification à droite avec des espaces
  printf("[%-10s]\n",  $s); // justification à gauche avec des espaces
                                                                       
                                                                       



but this one:
                                                                       
                                                                       
                                                                       
  printf("[%'#10s]\n",  $s); // utilisation du caractère personnalisé de
  séparation '#'                                                     
                                                                       
                                                                       

is ok (with any separator)

Source: http://ch2.php.net/manual/fr/function.sprintf.php

Is it related to French characters set I used for displaying my page ?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="fr" lang="fr">

Thanks for your advice
N. TRUONG

--- End Message ---
--- Begin Message ---
On 06/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hello,

The following examples don't work



  printf("[%10s]\n", $s); // justification à droite avec des espaces
  printf("[%-10s]\n", $s); // justification à gauche avec des espaces





but this one:



  printf("[%'#10s]\n", $s); // utilisation du caractère personnalisé de
  séparation '#'



is ok (with any separator)

Source: http://ch2.php.net/manual/fr/function.sprintf.php

Is it related to French characters set I used for displaying my page ?


We'd only know if you told us what "doesn't work" means. Do you get
_any_ output? What? Error messages? Are you sure that you're using
UTF-8 encoding?

Dotan Cohen

http://what-is-what.com/what_is/xml.html

--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2006-11-06 12:46:14 +0100:
> 
> Hello,
> 
> The following examples don't work
>                                                                        
>   printf("[%10s]\n",    $s); // justification ? droite avec des espaces
>   printf("[%-10s]\n",  $s); // justification ? gauche avec des espaces
>                                                                        
> but this one:
>                                                                        
>   printf("[%'#10s]\n",  $s); // utilisation du caract?re personnalisé de
>   séparation '#'                                                     
> 
> is ok (with any separator)

it works:

[EMAIL PROTECTED] ~ 1003:0 > php tmp/scratch
[monkey]
[    monkey]
[monkey    ]
[0000monkey]
[####monkey]
[many monke]
[EMAIL PROTECTED] ~ 1004:0 >

> Is it related to French characters set I used for displaying my page ?

No, it's related to your browser replacing multiple whitespace
characters with a single horizontal space.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

--- End Message ---
--- Begin Message ---
At 4:27 PM +0300 11/5/06, Mark Steudel wrote:
I'm currently serving in Peace Corps in Kenya and I was looking for other
PHP web developers that are doing e-commerce that I could ping about what
requirements/paperwork etc is involved in setting up e-commerce accounts in
Kenya.

Thanks, Mark

Mark:

Why should it make any difference where you set it up?

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
tedd wrote:

Mark:

Why should it make any difference where you set it up?

differant countries and there banks have different policy's when it come to online credit card transactions.


tedd

--- End Message ---
--- Begin Message ---
At 3:13 PM +0200 11/5/06, Dotan Cohen wrote:
I have a list of subjects, such as "Linux", "Open Source", and "the
World Wide Web". The subjects are stored in a database and being
retrieved via php. I currently organize them alphabetically with SQL's
ORDER BY ASC argument, however, if there is a preceding "the " or "a "
then that is considered as part of the alphabetical order. Thus, all
the subjects starting with "the " are grouped together, as are the
subjects starting with "a ". How can I order by ascending, without
taking the preceding "the " or "a " into account?

Thanks in advance.

Dotan Cohen


Dotan:

In your table, set up a sort field. That way there will be no interpolation as to what you want.

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On 11/5/06, Roman Neuhauser <[EMAIL PROTECTED]> wrote:

    If you used PostgreSQL I'd suggest a functional index and ordering
    on the function... Does MySQL have anything like this?

    CREATE FUNCTION fn(TEXT)
    RETURNS TEXT
    IMMUTABLE STRICT
    LANGUAGE SQL
    AS $$
      SELECT regexp_replace($1, '^(?:(?:a|the)[[:space:]]+)', '', 'i');
    $$;

    CREATE INDEX ON table(fn(subject));

Thats rather nifty, i dont think you can do that with mysql, but you
could achieve something close to that with a trigger for insert/update
to apply the regex to a different field that is used for sorting.

The other option would make a policy to put ", The" or ", A" at the
end of the string a simple function to render the text without the
comma at the end would be simple to do.

Curt

--- End Message ---
--- Begin Message --- use readfile to read the file and output it to the browser. I don't know the specific ones, but you'll need to also send headers that declare the file as streaming media.


On Nov 4, 2006, at 10:08 PM, Adam Gittins wrote:

Thanks. :)
That's an idea... Few questions. Grab the file and sendt it to someone, that would work with a download but would it work with a streaming audio file, because that has to be opened in realOne player or windows media player? I was searching PHP.net documentation for a way of grabbing a file - what
function would be used?? Sorry about the silly questions..

Sincerely,
Adam




On 11/4/06, Ed Lazor <[EMAIL PROTECTED]> wrote:

You put the data in a directory outside of the webspace and use PHP
to grab the file and send it to someone.  That way you're able to
control access to the file.

By webspace, I'm referring to the directories outside of the ones
used to store and serve your webpages.  This directory structure
would serve as an example for where you store your webpages and where
you store your data separately from the webpages:

/www/www.somesite.com/htdocs
/www/www.somesite.com/data




On Nov 3, 2006, at 9:29 PM, Adam Gittins wrote:

> Dear List,
>
>     I have had a question that has been bugging me for a while now.
> Say
> that I need to have a members website. Which I want to protect
> streaming
> audio (Real, or Windows Media), now all the pages I can protect
> with a MYSQL
> DB and PHP. But when it comes to protecting a url of a file or
> audio feed it
> becomes tricky. What is the procedure? Would I have to use the
> htaccess
> file? But then when I open a realaudio file it will ask for a
> username and
> passworld again..
>
> How does one protect an url - or do I have to copy the file to a
> temp dir
> and then after a set time delete it?
>
> Help, there must be a way..
>
> Thanks for any ideas..
>
> Sincerely,
> Adam



--- End Message ---
--- Begin Message ---
Hey all,

Most of you have seen me long enough on this list and helped me more times than 
I want to remember to know that this is not a spam email, that said...

A project has dropped into my lap to clone a site's functionality... rather 
than post it on the many freelance job sites as I dont have time to do this 
myself (and not sure about the skill either...even though i know i can come 
here for help if I hit a brick wall in the middle of the project) thought I 
would give it a shot here first.

I'll just skim the details so most of you will know if you're interested in a 
few seconds and can write back to me for details (offlist, we dont want to 
offend anyone :) )

===========
Budget: around $800 USD

Skills needed:
===========
PHP 4 (NOT 5)

MySql

Smarty (No designing needed, we'll get the designs later and "connect" them)

(This will be running on a Linux server so a little understanding/experience 
here would be a bonus but its not a requirment.)

Understanding the httpd.conf file of apache and (IMPORTANT) URL rewriting via 
directives in that file

Understanding PERL (as theres one client script that has to be in 
PERL...already created)

If you're serious about freelancing for a project please reply, I ask the 
"simply curious" to kindly ignore this post. Thanks in advance!
 
Questions? I'm just an email away :)

Cheers!
Ryan





------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
 
---------------------------------
Everyone is raving about the all-new Yahoo! Mail.

--- End Message ---
--- Begin Message ---
Hi,

I am using the fsockopen(), fwrite() and fread() functions to get a web page from a remote server. The remote server is currently down and I see the code hangs on the fwrite() call. Is there a way how to set a timeout for the fwrite() remote call?

I have found the stream_set_timeout(), but it seems not to be effective on the fwrite(), only on fread().

Thanks,

Martin

--- End Message ---
--- Begin Message ---
Hi,

I am using the fsockopen(), fwrite() and fread() functions to get a web page from a remote server. The remote server is currently down and I see the code hangs on the fwrite() call. Is there a way how to set a timeout for the fwrite() remote call?

I have found the stream_set_timeout(), but it seems not to be effective on the fwrite(), only on fread().

Thanks,

Martin

--- End Message ---
--- Begin Message --- On Wed, 01 Nov 2006 23:23:15 +0100, "Jay Blanchard" <[EMAIL PROTECTED]> wrote:

[snip]
I guess that's sorta what I'm afraid of... PHP#
(like the did to Java -> J++ -> C# )

Don't get me wrong. C# is a great language (probably one of the few
things
that M$ did right), and I'd LOOOOOVE to use a real IDE like Visual
Studio to
dev in...

But I'm also terrified they'll pervert PHP.
[/snip]

Please NO.... PHP.NET === ACCCKKKKKKKKKKKKKKKKKKKKKKK

The .NET compiler for PHP exists for many years. It was created by students of the Charles University in Prague.

Martin

--- End Message ---
--- Begin Message ---
Jay Blanchard wrote:
[snip]
I guess that's sorta what I'm afraid of... PHP# (like the did to Java -> J++ -> C# )

Don't get me wrong. C# is a great language (probably one of the few
things
that M$ did right), and I'd LOOOOOVE to use a real IDE like Visual
Studio to
dev in...
But I'm also terrified they'll pervert PHP.
[/snip]

Please NO.... PHP.NET === ACCCKKKKKKKKKKKKKKKKKKKKKKK

The .NET compiler for PHP exists for many years. It is created and managed by students of the Charles University in Prague.

Martin

--- End Message ---
--- Begin Message ---
Greetings All,

Have something that I am sure is easy to do, just never done it before and
would like some guidance here.

I need to pull treasure yield percentage rates into a loan site I am working
on.

So basically I want to hit a page from another site.
Grab the HTML file.
Parse it for the values I am looking for.
And then plug it into variables for use on my site.

Any ideas on the best way to do this??

--
Blessed Be

Phillip

--- End Message ---

Reply via email to