php-general Digest 16 Mar 2007 12:15:22 -0000 Issue 4680
Topics (messages 250696 through 250704):
Re: DOMXPath->Query, quotes and apostrophes
250696 by: Adam Randall
php - web service (ajax/jscript)
250697 by: bruce
250700 by: Haydar Tuna
php bar/graph scripts/library
250698 by: Ron Croonenberg
250701 by: Tijnema !
250702 by: Shafiq Rehman
250703 by: Mikey
Re: LAMP Opportunity
250699 by: Nobody Special
References challenge with PHP4
250704 by: Lluis Pamies
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:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
I seem to be hitting a wall here. I have the need to run an XPath query
on strings that may contain quotes, apostrophes or both. Going through
google turned up some interesting information, but nothing that solved
my issue.
An example of what I am trying to do is as follows:
$query = '\'foo"bar';
$xpath->query('/[EMAIL PROTECTED]"'.$query.'"]')->item(0);
This produces these warnings and errors:
Warning: DOMXPath::query() [function.DOMXPath-query]: Invalid predicate
Warning: DOMXPath::query() [function.DOMXPath-query]: Invalid expression
Fatal error: Call to a member function item() on a non-object
I've tried to escape the characters in the query, but that seems to be
illegal for XPath from what I've read. I've tried turning the quotes
into " and apostrophes into ' but it appears that XPath
requires that the data be unencoded to work.
I've seen reference to using XSLT to set XPath variables instead, but I
don't understand how to do implement this.
I would really appreciate any examples on what people have done to get
around this issue, if any one has at all.
Regards,
Adam.
--
Adam Randall <[EMAIL PROTECTED]>
(206) 285-8080
100 West Harrison
North Tower, Suite 300
Seattle, WA
98119
"Engineers like to solve problems. If there are no problems handily
available, they will create their own problems." - Dilbert
--- End Message ---
--- Begin Message ---
Hi
I'm trying to find information with regards to how to create/implement a
test web services app. I'm trying to find pointers to anyone who's actually
created this kind of functionality, or pointers to web sites where I can
find the information I'm looking for.
For my test, App1 has the web service, and provides the jscript/ajax code to
the 3rd Party, for use on the Test App. I'm trying to find php code for the
apps on the web servers as well as test php code for the api on the Master
Server. I'm also trying to get/find a test situation that provides test
client code (jscript/ajax) to be implemented on the test server/app.
Assume:
Master Server 3rd Party Server (separate domain)
App1 Test App
API File (aa.js) (from Master Server)
JScript (aa.js) ------>>-----------------^
The aa.js file allows the 3rd party client site to be able to interface with
the Master Server API via the API/services defined in the API File. I'm
envisioning the following actions for the user
3rd Party Site Master Server
-User Enters Name >>>>>>>>>>>>>> api checks/verifies name
-gets response
Master Server <<<<<<<<<<<<<< returns response
-user answers
question based
on response,
sends response
to master server
via api >>>>>>>>>>>>>> api checks user input
-gets response
Master Server <<<<<<<<<<<<<< returns response
-jscript then
gives reply/response
to the 3rd Party site,
allowing the site/app
to continue processing
In this case, the jscript/ajax app is really only communicating with the
Master Server, which if I understand it correctly would be in the same
domain as the ajax/jscript code. In other words, if the master server
supplies the jscript file(s) for the jscript that's to be run on the 3rd
party server, then any communication that's initiated from the jscript is
going back to the master server. There shouldn't be a cross domain issue?
Yes/No???
So, anyone who's actually implemented a real live web service, that's
willing to talk to me would be helpful, or if you can point me to sample
docs/code...
Thanks
-bruce
--- End Message ---
--- Begin Message ---
Hello,
Have you ever use nuSOAP libarary? You can connect any web service or
create your own service. If you connect to MS Web Service with digest
authentication, you will face to problems. I think MS add extra header
information them web services. But you can connect java web services easily.
You can find any information about nuSOAP in the
http://sourceforge.net/projects/nusoap/ web site:)
--
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net
""bruce"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi
>
> I'm trying to find information with regards to how to create/implement a
> test web services app. I'm trying to find pointers to anyone who's
> actually
> created this kind of functionality, or pointers to web sites where I can
> find the information I'm looking for.
>
> For my test, App1 has the web service, and provides the jscript/ajax code
> to
> the 3rd Party, for use on the Test App. I'm trying to find php code for
> the
> apps on the web servers as well as test php code for the api on the Master
> Server. I'm also trying to get/find a test situation that provides test
> client code (jscript/ajax) to be implemented on the test server/app.
>
> Assume:
> Master Server 3rd Party Server (separate domain)
> App1 Test App
> API File (aa.js) (from Master Server)
> JScript (aa.js) ------>>-----------------^
>
> The aa.js file allows the 3rd party client site to be able to interface
> with
> the Master Server API via the API/services defined in the API File. I'm
> envisioning the following actions for the user
>
> 3rd Party Site Master Server
> -User Enters Name >>>>>>>>>>>>>> api checks/verifies name
> -gets response
> Master Server <<<<<<<<<<<<<< returns response
> -user answers
> question based
> on response,
> sends response
> to master server
> via api >>>>>>>>>>>>>> api checks user input
> -gets response
> Master Server <<<<<<<<<<<<<< returns response
> -jscript then
> gives reply/response
> to the 3rd Party site,
> allowing the site/app
> to continue processing
>
> In this case, the jscript/ajax app is really only communicating with the
> Master Server, which if I understand it correctly would be in the same
> domain as the ajax/jscript code. In other words, if the master server
> supplies the jscript file(s) for the jscript that's to be run on the 3rd
> party server, then any communication that's initiated from the jscript is
> going back to the master server. There shouldn't be a cross domain issue?
> Yes/No???
>
> So, anyone who's actually implemented a real live web service, that's
> willing to talk to me would be helpful, or if you can point me to sample
> docs/code...
>
> Thanks
>
> -bruce
>
>
--- End Message ---
--- Begin Message ---
hello all,
I am looking for some scripts/libraries etc to produce some bar graphs etc.
Does anyone know of something "nice (that works on Linux)
thanks,
Ron
--- End Message ---
--- Begin Message ---
On 3/16/07, Ron Croonenberg <[EMAIL PROTECTED]> wrote:
hello all,
I am looking for some scripts/libraries etc to produce some bar graphs etc.
Does anyone know of something "nice (that works on Linux)
thanks,
Ron
If i understand you correctly you want to have a moving progress bar?
If so, it is NOT possible with PHP, because PHP is server side, and
making that thing move should be done on client side (Javascript).
If you don't want to let it move, it is nothing more then just
displaying a picture of a bar :)
Tijnema
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hello,
You can create graphs with Flash. Here is the link
http://www.maani.us/charts/index.php
Alternately you can also use JPGraph: http://www.aditus.nu/jpgraph/
--
Shafiq Rehman (ZCE)
http://phpgurru.com | http://shafiq.pk
On 3/16/07, Tijnema ! <[EMAIL PROTECTED]> wrote:
On 3/16/07, Ron Croonenberg <[EMAIL PROTECTED]> wrote:
> hello all,
>
> I am looking for some scripts/libraries etc to produce some bar graphs
etc.
>
> Does anyone know of something "nice (that works on Linux)
>
> thanks,
> Ron
If i understand you correctly you want to have a moving progress bar?
If so, it is NOT possible with PHP, because PHP is server side, and
making that thing move should be done on client side (Javascript).
If you don't want to let it move, it is nothing more then just
displaying a picture of a bar :)
Tijnema
>
> --
> 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
--- End Message ---
--- Begin Message ---
Ron Croonenberg wrote:
hello all,
I am looking for some scripts/libraries etc to produce some bar graphs etc.
Does anyone know of something "nice (that works on Linux)
thanks,
Ron
You really should try STFW first:
http://www.google.co.uk/search?hl=en&q=php+graphs&meta=
A lot of what you are looking for on the first page...
Mikey
--- End Message ---
--- Begin Message ---
Prestigious Online NY Based News Paper is seeking a solid *LAMP (see
definition of LAMP below) developer to work as part of
A team to architect and build the software that helps the online
newspaper function as a site with an unparalleled combination of scale
and complexity. The successful candidate is enthusiastic about building
out the content offerings and dynamic features of the site and has done
significant web programming in the Unix environment.
Did you know that were I work, plain old key value pairs sent over
HTTP is not enterprisey enough? They blame it for application
problems rather than their crap AIX/JSP implementation. Now they want
to convert it to soap/webmethods! ARRRRRRGH, who subscribed them to
infoweek!!!
Responsibilities:
* * Writing application and related database objects to enable users*
* dynamic interaction with the web site
Ummmm, I can just smell the AJAX talk...
* Integrating a diverse set of data sources including related databases,
search engines, and XML data
y = integral from 1 to infinity of x /dXml
* Integrating feeds from 3rd parties into the nytimes.com content
management system
Do you have all the contracts in place so you don't get sued for
copyright infringement? I heard that viacom, riaa, and mpaa are
always looking for a new source of income.
The ideal candidate must have high standards with regard to the finished
product and must be concerned about the quality and
maintainability of the underlying software. In addition, the ideal
candidate possess the ability to design systems, communicate and
work effectively with others, write scalable and high quality code, and
deliver work on schedule.
Well, that leaves me out. I could care less...
Necessary skills:
* B.S./B.A. in Computer Science or a degree in a related field plus
Computer Science coursework
I got the BS part right.
* 3-6 years web development work experience
I wrote a web page 6 years ago. Just yesterday I updated it. Does that count.
* Unix proficiency
I can FSCK right up there with the rest of them.
* Experience with one or more scripting languages such as Perl, PHP and
Python
What do snakes have to do with it?
* Strong working knowledge of RDBMS, SQL and basic database
optimization concepts
The M in LAMP stands for mysql, I'm not sure this counts.
* Experience working with XML, XSL, XPath
and other things starting with X.
* Comfort with Regular Expressions
Sounds kinky!
* Ability to communicate effectively with business side clients to
gather and translate functional specs
Ability to translate BS into gibberish.
* Working knowledge of HTML, Javascript
I thought you wanted 3-6 years? You just need working knowledge?
* Experience working as part of a team
Me, myself and I.
* Strong verbal and written communication skills
Duhhhhhh, like wow! Dude I can so rap up the suits.
Desired skills:
* Formal software development methodology
You're talking LAMP, remember.
* Experience writing shared and reusable components of code
Stop it your scaring me.
* Experience designing and tuning applications that can scale
I have other uses for scales.
* Some background in a structured programming language, such as Java or
C/C++
How about turtle graphics? It is pretty structured.
* Oracle-specific SQL, PL/SQL
Wait, there is no O in LAMP.
* Use of source control
cp myprogram.php myprogramv1.php, check.
*Short for Linux, Apache, MySQL and PHP, an open-source Web development
platform that uses Linux as the operating system, Apache as the Web
server, MySQL as the RDBMS and PHP as the object-oriented scripting
language. Perl or Python is often substituted for PHP. LAMP has become a
de facto development standard.
Are you sure this is a real job, you didn't once mention AJAX.
--- End Message ---
--- Begin Message ---
I've the following code:
1 <?php
2
3 class B {
4 function B(&$a) {
5 $this->a = &$a;
6 }
7
8 function run() {
9 print "{$this->a->msg}\n";
10 }
11 }
12
13 class A {
14 function A() {
15 $this->b = new B(&$this);
16 }
17
18 function &getInstance() {
19 static $inst;
20 if(!isset($inst)) $inst = new A();
21 return $inst;
22 }
23
24 function run() {
25 $this->b->run();
26 }
27 }
28
29 $a = &A::getInstance();
30 $a->msg = "Hello world !";
31
32 // Some tasks, flow control, scope changes, ...
33
34 $a = &A::getInstance();
35 print "{$a->msg}\n"; // This should print "Hello world !"
36 $a->run(); // This should print "Hello world !"
37
38 ?>
My problem is that I don't know what I need to do in order to print
the same value in lines 35 and 36. Line 35 prints "Hello world !", but
in the 36 nothing appears. What I'm doing wrong ?
Thanks for all !
--- End Message ---