php-general Digest 20 Jan 2007 20:20:08 -0000 Issue 4580

Topics (messages 247434 through 247461):

Re: Get the shortened browser / HTTP_USER_AGENT
        247434 by: Sergiu Voicu

Re: non-blocking request to a url (via curl or file_get_contents or whatever)...
        247435 by: Roman Neuhauser
        247450 by: Jochem Maas
        247459 by: Roman Neuhauser
        247460 by: Roman Neuhauser

Re: Need tool to graphically show all includes/requires
        247436 by: Roman Neuhauser
        247437 by: Colin Guthrie
        247440 by: Andre Dubuc

Re: email validation string.
        247438 by: tedd
        247439 by: tedd
        247441 by: Roman Neuhauser
        247443 by: tedd
        247446 by: Roman Neuhauser
        247447 by: tedd

os php scheduler?
        247442 by: blackwater dev

Re: Going back with multiple submits to the same page
        247444 by: tedd

Request for...
        247445 by: Wikus Moller
        247451 by: Jochem Maas
        247452 by: Stut
        247454 by: Børge Holen
        247457 by: Jay Blanchard
        247461 by: Jay Blanchard

Re: Security Question
        247448 by: Al

Re: Script to generate a site thumbnails
        247449 by: tedd

Re: nuSoap -method '' not defined in service
        247453 by: Martin Alterisio

Re: Storing values in arrays
        247455 by: tedd

Re: preg_match problem
        247456 by: Martin Alterisio
        247458 by: Arpad Ray

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 ---
You have several options:
1. using regular expressions
<?
$user = $_SERVER["HTTP_USER_AGENT"];
preg_match('/^([^\/]+).*/',$user,$matches);
$browser = $matches[1];
?>

2. using arrays
<?
$user = $_SERVER["HTTP_USER_AGENT"];
$tpm = explode('/',$user);
$browser = $tmp[0];
?>

3. using substrings
<?
$user = $_SERVER["HTTP_USER_AGENT"];
$browser = substr($user,0,strpos($user,'/');
?>

Sergiu

Wikus Moller wrote:
Hi.

I want to strip everything after a / in the HTTP_USER_AGENT for
example: Opera 9.10/blah/blah would become only Opera 9.10

Lets say
$user = $_SERVER["HTTP_USER_AGENT"];
$browser = ("/", $user);

Is this correct?
Isn't something needed in the browser variable?

Thanks
Wikus


--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2007-01-20 00:33:10 +0100:
> I have a tradedoubler webbug to implement in site

Pardon my ignorance, what's "a tradedoubler webbug"?

> I have an order processing page that is requested *directly* by an online 
> payment service
> in order to tell the site/system that a given order has successfully 
> completely,
> this occurs prior to the online payment service redirecting the user back to 
> my site...
> 
> at the end of the order processing the order (basically the order is marked 
> as completed)
> is removed from the session in such a way that there is no longer anyway to 
> know details
> about the order, so by the time the user comes back to the site I don't have 
> the required
> info to create the required webbug url...

Wou should still have the order id, or how do they tell you *which*
order was it? What data do you need? I'm having trouble understanding
your email at all. Could you try again, using shorter sentences? :)
 
-- 
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 ---
Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-20 00:33:10 +0100:
>> I have a tradedoubler webbug to implement in site
> 
> Pardon my ignorance, what's "a tradedoubler webbug"?

http://www.tradedoubler.com/pan/public should explain;
a webbug is merely an <img> tag with a src pointing to some
kind of tracking script.


> 
>> I have an order processing page that is requested *directly* by an online 
>> payment service
>> in order to tell the site/system that a given order has successfully 
>> completely,
>> this occurs prior to the online payment service redirecting the user back to 
>> my site...
>>
>> at the end of the order processing the order (basically the order is marked 
>> as completed)
>> is removed from the session in such a way that there is no longer anyway to 
>> know details
>> about the order, so by the time the user comes back to the site I don't have 
>> the required
>> info to create the required webbug url...
> 
> Wou should still have the order id, or how do they tell you *which*
> order was it? What data do you need? I'm having trouble understanding
> your email at all. Could you try again, using shorter sentences? :)

I think that probably the whole story is a bit superfluous, essentially the 
question is
simply: how do I make a non-blocking http request and let the script continue 
immediately
without ever caring about what response/content is returned by the http request.

nonetheless here is 'flow' of what I was describing.

1. user stuffs things into shopping basket on [my] site (data stored in session)
2. user goes to check out.
3. user chooses online payment.
4. user is redirected to online payment provider site
5. user completes payment successfully
6. online payment provider site contacts [my] site/server directly with 
transaction status/details
7. user is shown 'thank you' page on online payment provider site
8. user is redirected back to [my] site and shown 'real' 'thank you' page.

step 6 does not involve the user or the browser *at all* it's a direct server 
to server
communication. the request the online payment provider makes to my server 
causes the
order to be completed, saved to a database and the relevant data to be removed 
from
the users session. (completed orders 'disappear' from the website - this was a 
'security'
requirement of the client).

normally in step 8 the webbug would be placed on the 'thank you' page, but in 
this case
the data needed to craft the webbug's url is no longer available - the solution 
is
to perform the request the the webbug's url represents directly from my server 
during the
code that runs as a result of the request made by the online payment provider 
in step 6.

this is easy if I merely do this:

        file_get_contents($webbugURL);

BUT this means the http request this entails would block further processing
of my script until the request returns it's content, what I would like to do is
make the request without waiting for *any* kind of communication from the server
reference in the $webbugURL.

does this make sense?


>  

--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2007-01-20 01:30:55 +0100:
> > I definitely give a hoot about the content returned ... all I want
> > is for the request to go out on the wire and then have my script
> > immediately continue with what it should be doing.
> > 
> > I believe this would require creating a non-blocking connection in
> > some way, but I'm stuck as to the correct way to tackle this. I've
> > been reading about non-blocking sockets/streams etc but I'm just
> > becoming more and more confused really, anyone care to put me out of
> > my misery?
> 
> did more reading, still unsure of the whole thing, this is what I have
> right now:
> 
>           $url = array('', 'tbs.tradedoubler.com', '/report?blablablabla');
>             $isSSL = true;
>             $proto = $isSSL ? 'ssl://' : 'http://';
>             $port  = $isSSL ? 443 : 80;
>             $errno = $errstr = null;
>             if ($sock = fsockopen($proto.$url[1], $port, $errno, $errstr, 
> 10)) {
>                 stream_set_blocking($sock, 0);
>                 fwrite($sock, "GET {$url[2]} HTTP/1.0\r\n");
>                 fwrite($sock, "Host: {$url[1]}\r\n");
>                 //fwrite($sock, "Content-length: 0\r\n");
>                 //fwrite($sock, "Accept: */*\r\n");
>                 fwrite($sock, "\r\n");
>                 fclose($sock);
>             }
> 
> does this make any sense, will this work at all?
> would the 10 second timeout [potentially] negate all the hard work?

Yes, you need to wait for the socket to connect, and that's synchronous
in all cases.  I don't know enough about sockets in PHP to help further
here, but if the semantics follows write(2) behavior in C, then what you
have is broken. Non-blocking IO means the fwrite() could return before
it could write all you gave it (it returns how many bytes it's written).


-- 
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 ---
# [EMAIL PROTECTED] / 2007-01-20 16:50:48 +0100:
> Roman Neuhauser wrote:
> 1. user stuffs things into shopping basket on [my] site (data stored in 
> session)
> 2. user goes to check out.
> 3. user chooses online payment.
> 4. user is redirected to online payment provider site
> 5. user completes payment successfully
> 6. online payment provider site contacts [my] site/server directly with 
> transaction status/details
> 7. user is shown 'thank you' page on online payment provider site
> 8. user is redirected back to [my] site and shown 'real' 'thank you' page.

That was perfect, thanks a lot!
 
> normally in step 8 the webbug would be placed on the 'thank you' page,
> but in this case the data needed to craft the webbug's url is no
> longer available - the solution is to perform the request the the
> webbug's url represents directly from my server during the
> code that runs as a result of the request made by the online payment
> provider in step 6.

Is it important that the callback gets called synchronously?  Is the
order reconstructible from the callback url?  If not I'd write
a small script to fetch urls from a database table and feed them to
wget or similar. 

-- 
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 ---
# [EMAIL PROTECTED] / 2007-01-19 16:52:49 -0800:
> We have a fairly complex product that is all PHP based GUI.
> 
> We're in need of some kind of "graphical tool" (web, stand alone, windows,
> linux, osx whatever) that will take a directory tree, recursively traverse
> all the files, look for 'includes' and 'requires' (and the _once versions
> too) and then map them out so we can see what files are calling what and
> where.

That's impossible to tell exactly without running the software you're
studying. What would you map this to?

function include_($file) { include $file; }

Or this?

define('FOO_INLCUDE_DIR', '/some/path');
include FOO_INLCUDE_DIR . '/file.php';

The recursive part is easy:

find $topsrcdir -name \*.php -print0 | xargs -0n1 processing-script-for-one-file

-- 
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 ---
Daevid Vincent wrote:
> We have a fairly complex product that is all PHP based GUI.
> 
> We're in need of some kind of "graphical tool" (web, stand alone, windows,
> linux, osx whatever) that will take a directory tree, recursively traverse
> all the files, look for 'includes' and 'requires' (and the _once versions
> too) and then map them out so we can see what files are calling what and
> where.
> 
> Anyone suggest something?
> 

My colleague wrote a script that used dot to generate such a pattern but
this is more or less useless for us now that we use the autoloading
features of PHP5...

If I can fid the script I'll post it, but not sure where it went.

Also if you use variables in the include/require, then it will fail most
horribly.

Col.

--- End Message ---
--- Begin Message ---
On Saturday 20 January 2007 07:35 am, Colin Guthrie wrote:
> Daevid Vincent wrote:
> > We have a fairly complex product that is all PHP based GUI.
> > 
> > We're in need of some kind of "graphical tool" (web, stand alone, windows,
> > linux, osx whatever) that will take a directory tree, recursively traverse
> > all the files, look for 'includes' and 'requires' (and the _once versions
> > too) and then map them out so we can see what files are calling what and
> > where.
> > 
> > Anyone suggest something?
> > 
> 
> My colleague wrote a script that used dot to generate such a pattern but
> this is more or less useless for us now that we use the autoloading
> features of PHP5...
> 
> If I can fid the script I'll post it, but not sure where it went.
> 
> Also if you use variables in the include/require, then it will fail most
> horribly.
> 
> Col.
> 

Just a thought following on Colin's idea. YIf you can't find anything to do the 
job, you should be able to modify 'staviz' that uses dot to graphically 
show log files - clickthroughs to various pages. The code should at least give 
you the structure you could fool around with.

Hth,
Andre

--- End Message ---
--- Begin Message ---
At 5:54 PM +0200 1/19/07, WeberSites LTD wrote:
Top Ajax :
I meant that at the top of WeberDev.com there is an Ajax search box that you
can use
to search for "email validation" and see many related code examples to
choose from.

berber

berber:

Your original post was clear enough for me to understand. Probably something else going on.

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

--- End Message ---
--- Begin Message ---
On Thu, Jan 18, 2007 at 01:40:36PM -0700, Don wrote:
 I'm trying to get this line to validate an email address from a form and it
 isn't working.

 if (ereg("[EMAIL PROTECTED]",$submittedEmail))


 The book I'm referencing has this line

 if (ereg("[EMAIL PROTECTED]",$submittedEmail))

 Anyway.. I welcome any advice as long as it doesn't morph into a political
 debate on ADA standards and poverty in Africa. :-)

 Thanks

 Don


Don:

I picked this up in my travels.

function validate_email($email)
{

   // Create the syntactical validation regular expression
$regexp = "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$";

   // Presume that the email is invalid
   $valid = 0;

   // Validate the syntax
   if (eregi($regexp, $email))
   {
      list($username,$domaintld) = split("@",$email);
      // Validate the domain
      if (getmxrr($domaintld,$mxrecords))
         $valid = 1;
   } else {
      $valid = 0;
   }

   return $valid;

}

$email = "[EMAIL PROTECTED]";

if (validate_email($email))
   echo "Email is valid!";
else
   echo "Email is invalid!";

hth's

tedd


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

--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2007-01-20 08:53:32 -0500:
> I picked this up in my travels.
> 
> function validate_email($email)
> {
> 
>    // Create the syntactical validation regular expression
>    $regexp = 
> "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$";

One of my email addresses is
[EMAIL PROTECTED]

Also, "[" ip-address "]" is a valid right hand side of an email address,
e. g.:

[EMAIL PROTECTED]

-- 
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 3:04 PM +0000 1/20/07, Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-20 08:53:32 -0500:
 I picked this up in my travels.

 function validate_email($email)
 {

    // Create the syntactical validation regular expression
    $regexp =
 "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$";

One of my email addresses is
[EMAIL PROTECTED]


Thanks, I'll add that to my kill list.

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

--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2007-01-20 09:22:00 -0500:
> At 3:04 PM +0000 1/20/07, Roman Neuhauser wrote:
> >One of my email addresses is
> >[EMAIL PROTECTED]
> 
> Thanks, I'll add that to my kill list.

Vietnam vet... Old habits don't go away easily huh?

-- 
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 3:47 PM +0000 1/20/07, Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-20 09:22:00 -0500:
 At 3:04 PM +0000 1/20/07, Roman Neuhauser wrote:
 >One of my email addresses is
 >[EMAIL PROTECTED]

 Thanks, I'll add that to my kill list.

Vietnam vet... Old habits don't go away easily huh?

I didn't think of it that way, but that's a thought. Let's hope that you never run into a Vietnam vet who thinks that way (they do exist). As for me, I figure that you've never had any adversity to confront, so you just don't know any better -- however, I'm sure life experience and maturity will help you understand. Good luck with that.

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

--- End Message ---
--- Begin Message ---
Does anyone have recommendations for an open source php based,
'lightweight', scheduling app?  I just want something clean that I can use
to schedule trainings within our company.  I need to be able to put in
details for each training and then see a synopsis on a calender.  Just a
basic scheduler but clean and useful.

Thanks!

--- End Message ---
--- Begin Message ---
At 8:43 PM +0100 1/18/07, Otto Wyss wrote:
Paul Novitski wrote:
At 1/15/2007 01:52 PM, Otto Wyss wrote:
When values are entered on one of my page I submit the result back to the same page (form action=same_page). Unfortunately each submit
adds an entry into the history, so history back doesn't work in a
single step. Yet if the count of submits were known I could use
goto(n). What's the best way to get this count? PHP or Javascript?


What you're suggesting doesn't sound easy.

I know, but what's a better way to to go back?


Apparently you didn't get/read my post -- try:

location.replace('<whatever>');

The location object has two methods: a) reload; b) replace. This is where the back button get's it's value. Replace that value and I think you'll find a solution, or at least that's where I would look.

As for how to keep your entries "sticky", then I would look to sessions.

tedd

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

--- End Message ---
--- Begin Message ---
Hi.

Since this is a mailing list for web developers, I thought I might as
well post an o f f  t o p i c request.
Does anyone know of any website where I can get a exe or jar sitemap
generating software? Particularly not GsiteCrawler as it uses too much
system resources. A java applet would be nice. And, if possible, free
of charge ^.^

And does anyone know how and if a j a v a applet can be extracted from
a webpage?(also a class)

Thanks
Wikus

--- End Message ---
--- Begin Message ---
Wikus Moller wrote:
> Hi.
> 
> Since this is a mailing list for web developers, I thought I might as
> well post an o f f  t o p i c request.
> Does anyone know of any website where I can get a exe or jar sitemap
> generating software? 

php.

> Particularly not GsiteCrawler as it uses too much
> system resources. A java applet would be nice. And, if possible, free
> of charge ^.^
> 
> And does anyone know how and if a j a v a applet can be extracted from
> a webpage?(also a class)

yes is can. scrap the relevant page, find the relevant url and
make a request for that resource. bingo~

> 
> Thanks
> Wikus
> 

--- End Message ---
--- Begin Message ---
Wikus Moller wrote:
Since this is a mailing list for web developers, I thought I might as
well post an o f f  t o p i c request.
Does anyone know of any website where I can get a exe or jar sitemap
generating software? Particularly not GsiteCrawler as it uses too much
system resources. A java applet would be nice. And, if possible, free
of charge ^.^

And does anyone know how and if a j a v a applet can be extracted from
a webpage?(also a class)

1) You state that you know it's off-topic.
2) For some reason you felt the need to make excessive use of spaces (while offtopic and java are considered dirty words in some places, they're not here, and even then you didn't "obfuscate" all instances). 3) This is not a mailing list for web developers, it's a mailing list for PHP developers. The fact that most PHP development happens in a web context does not make it exclusively for web development.
4) You would prefer a java applet yet you ask on a PHP mailing list.

My question... just how dumb are you?

Sorry, didn't mean that. I meant to ask... have you tried searching one of the many excellent search engines that are available? If so, and you didn't find a ton of relevant results, just how dumb are you?

-Stut

Easily annoyed today. Must be a Saturday, I never could get the hang of Saturdays.
[Doug is dead, long live Doug!!]
Ramble ramble ramble.

--- End Message ---
--- Begin Message ---
On Saturday 20 January 2007 17:09, Stut wrote:
> Wikus Moller wrote:
> > Since this is a mailing list for web developers, I thought I might as
> > well post an o f f  t o p i c request.
> > Does anyone know of any website where I can get a exe or jar sitemap
> > generating software? Particularly not GsiteCrawler as it uses too much
> > system resources. A java applet would be nice. And, if possible, free
> > of charge ^.^
> >
> > And does anyone know how and if a j a v a applet can be extracted from
> > a webpage?(also a class)
>
> 1) You state that you know it's off-topic.
> 2) For some reason you felt the need to make excessive use of spaces
> (while offtopic and java are considered dirty words in some places,
> they're not here, and even then you didn't "obfuscate" all instances).
> 3) This is not a mailing list for web developers, it's a mailing list
> for PHP developers. The fact that most PHP development happens in a web
> context does not make it exclusively for web development.
> 4) You would prefer a java applet yet you ask on a PHP mailing list.
>
> My question... just how dumb are you?
>
> Sorry, didn't mean that. I meant to ask... have you tried searching one
> of the many excellent search engines that are available? If so, and you
> didn't find a ton of relevant results, just how dumb are you?
>
> -Stut
>
> Easily annoyed today. Must be a Saturday, I never could get the hang of
> Saturdays.

ah,,... you say, I'm just ackin' to get rid of Tuesdays.
Saturdays is quite alright, in fact... this is the 
dontwannadonothingandgetsawaywithitday!


> [Doug is dead, long live Doug!!]
> Ramble ramble ramble.

-- 
---
Børge
Kennel Arivene 
http://www.arivene.net
---

--- End Message ---
--- Begin Message ---
[snip]
Since this is a mailing list for web developers
[/snip]

This is a mailing list for PHP developers who might also do web
development. Evolt.org has a great list for w e b d e v e l o p e r s
 

--- End Message ---
--- Begin Message ---
[snip]
Since this is a mailing list for web developers, I thought I might as
well post an o f f  t o p i c request.
Does anyone know of any website where I can get a exe or jar sitemap
generating software? Particularly not GsiteCrawler as it uses too much
system resources. A java applet would be nice. And, if possible, free
of charge ^.^

And does anyone know how and if a j a v a applet can be extracted from
a webpage?(also a class)
[/snip]

Wikus my dear fellow, are their Java mailing lists? Would you like me to
find one for you? Are you familiar with Google?

Better yet, how about one in PHP for free? I went to Google and typed in
'site map generator PHP' and the first result was
http://www.softswot.com/sitemapinfo.php. Not only is the web site done
in PHP, but the application is as well. How cool is that?

Listen up butt-bite. Next time, before you respond off list to those who
tried to give you even the teeniest bit of help please demonstrate that
you tried to help yourself get the answer or showed a modicum of
initiative. Hundreds will attempt to help you when you have shown that
you tried to help yourself.

 

--- End Message ---
--- Begin Message --- Here is part of my proxie tags to html tags translation array. Looks pretty safe to me. There is other code to recognize paragraphs and lists, etc.

$translate_array= array(
'<link>'          => '<a href="http://',
'</link>'         => '</a>',
'<slink>'         => '<a href="https://',
'</slink>'                => '</a>',
'<label>'         => '" target="_blank">',
"<email>"               => '<a href="mailto:',
"<name>                      => "\">",
'</email>'                => '</a>',
'<photo>'         => "<img class=\"floatleft\" alt=\"mug\" src=\"$scr",
'</photo>'                => '">',
'<blue-line>'             => "<div class=\"horzline\"></div>\n",
'<blue_line>'             => "<div class=\"horzline\"></div>\n",
'<images>'                => "<div class=\"images\">",
'</images>'               => "</div>\n",
'<no_banner>'             => '',
'<no_menu>'               => '',
'<return>' => "<div class=\"return\"><a style=\"text-decoration:underline\" href=\"$request_url\">Return to previous page</a></div>\n",
         );

Jochem Maas wrote:
Al wrote:
Good point about the '<script> evil haxor code here; </script>'.  That's
bad for our users, not the site, per se.

what is bad for your users is bad for your site, on top of that
the script is running in the context of your domain - all sorts of
nasty possibilities that could affect your site.

Raw text to html is primarily done with a series of preg_replace()
operations.

what/how [exactly] the transformation is done determines
whether your safe.

No include() or exec() allowed near the text.

Sounds like I'm in pretty good shape.

maybe, maybe not - see above.

(do you practice any sports? ;-P)

...

--- End Message ---
--- Begin Message ---
At 10:58 AM +0200 1/19/07, WeberSites LTD wrote:
If you can get the image to your server, try using one of these examples :

http://www.weberdev.com/AdvancedSearch.php?searchtype=title&search=thumb

berber

-----Original Message-----
From: Pablo L. de Miranda [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 18, 2007 12:56 AM
To: php-general@lists.php.net
Subject: [PHP] Script to generate a site thumbnails

Hi People,

I'm needing a script that generate a site thumbnail from a given URL.
Anybody can help me?

berber:

I think the poster's request was how do you get the browser's image of a URL and then make a thumbnail from it.

The problem of course being, which browser?

There are SE's (ask.com for example) that include an tool-tip thumbnail image of the url. I've often wondered how they did that.

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

--- End Message ---
--- Begin Message ---
Try the following:

$server->register('getColumns', array(), array());

The second argument is an array containing an entry for each argument of the
webservice call, and the third argument is an array for the return value.
Since you don't have either arguments nor return value, empty arrays should
be provided.

Also I think you should call $server->configureWSDL(<domain>), before
registering anything.

2007/1/18, blackwater dev <[EMAIL PROTECTED]>:

I have the following code but when I hit the page, I get the xml error of
method '' not defined in service.  I don't have a wsdl or anything
defined.
Is there more I need to do to get the SOAP service set up?

Thanks!

include("nusoap/nusoap.php");

$server=new soap_server();
$server->register('getColumns');

function getColumns(){

        $search= new carSearch();

        return $search->getSearchColumns();

}
$server->service($HTTP_RAW_POST_DATA);



--- End Message ---
--- Begin Message ---
At 3:33 PM -0800 1/18/07, Ryan A wrote:
tedd <[EMAIL PROTECTED]> wrote:

At 7:15 AM -0800 1/17/07, Ryan A wrote:
True, but thats not the most important part... I guess I wrote it
wrong, I meant that it should not write to disk before 1 minute...
anyway... about the "array saving" any ideas?

Thanks!
R

Why?

Hey Tedd,

Aww, nothing serious... just had a few ideas running in my head that needs something like this... and was wondering if it would save on server processing time and resources if done like this rather than writing to disk on every login...

Cheers!
R

Ahhh, I see. But isn't everything written somewhere?

If you did it client-side and used a javascript timer in the browser to delay the user's input from being submitted, that might work. But, I think it might also piss users off when they couldn't do anything in the interim.

If you did it server-side, then you would defeat what you wanted to accomplish with the server by it attending to a delay waiting to do something.

In the end, something has to attend to the delay and that probably would take more time than just writing the values to the disk. But, I may be wrong.

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

--- End Message ---
--- Begin Message ---
Double slash to prevent PHP interpreting the slashes. Also using single
quotes would be a good idea:

if (preg_match('/[\\w\\x2F]{6,}/',$a))


2007/1/19, Németh Zoltán <[EMAIL PROTECTED]>:

Hi all,

I have a simple checking like

if (preg_match("/[\w\x2F]{6,}/",$a))

as I would like to allow all "word characters" as mentioned at
http://hu2.php.net/manual/hu/reference.pcre.pattern.syntax.php
plus the '/' character, and at least 6 characters.

But it throws

Warning: preg_match(): Unknown modifier ']'

and returns false for "abc/de/ggg" which string should be okay.
If I omit the "\x2F", everything works fine but "/" characters are not
allowed. Anyone knows what I'm doing wrong? Maybe "/" characters can not
be put in patterns like this?

Thanks in advance,
Zoltán Németh

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



--- End Message ---
--- Begin Message ---
Martin Alterisio wrote:
Double slash to prevent PHP interpreting the slashes. Also using single
quotes would be a good idea:

if (preg_match('/[\\w\\x2F]{6,}/',$a))


Just switching to single quotes would do the trick - you don't need to escape anything but single quotes, and backslashes if they are the last character.

Arpad

--- End Message ---

Reply via email to