Ajax and PHP: XMLHTTP

This is a discussion on Ajax and PHP: XMLHTTP within the PHP General forums, part of the PHP Programming Forums category; <?=$_SERVER['PHP_SELF']?> Can I replace the above with some sort of XMLHTTP request? Googling now... thought I would ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-11-2006
Micky Hulse
 
Posts: n/a
Default Ajax and PHP: XMLHTTP

<?=$_SERVER['PHP_SELF']?>

Can I replace the above with some sort of XMLHTTP request?

Googling now... thought I would ask here first.

Any good links to tuts that might cover that sort of thing?

Kinda thinking about plugging some Ajax into a random image php script.

TIA. :)
Cheers,
Micky

--
Wishlist: <http://snipurl.com/vrs9>
Switch: <http://browsehappy.com/>
BCC?: <http://snipurl.com/w6f8>
My: <http://del.icio.us/mhulse>
Reply With Quote
  #2 (permalink)  
Old 09-11-2006
Alex Turner
 
Posts: n/a
Default Re: Ajax and PHP: XMLHTTP

Micky Hulse wrote:
> <?=$_SERVER['PHP_SELF']?>
>
> Can I replace the above with some sort of XMLHTTP request?
>
> Googling now... thought I would ask here first.
>
> Any good links to tuts that might cover that sort of thing?
>
> Kinda thinking about plugging some Ajax into a random image php script.
>
> TIA. :)
> Cheers,
> Micky
>

I think that is a javascript question is it not? Unless you mean to use
curl or some such.

AJ

--
www.deployview.com
www.nerds-central.com
www.project-network.com
Reply With Quote
  #3 (permalink)  
Old 09-11-2006
Arpad Ray
 
Posts: n/a
Default Re: [PHP] Ajax and PHP: XMLHTTP

Micky Hulse wrote:
> <?=$_SERVER['PHP_SELF']?>
>
> Can I replace the above with some sort of XMLHTTP request?
>

As noted, that's a javascript question. However your PHP code is
vulnerable to XSS attacks; you should at least encode the output with
htmlspecialchars() so that URLs like
"foo.php/<script>alert('hi');</script>" are safe.
eg. <?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>

Arpad
Reply With Quote
  #4 (permalink)  
Old 09-11-2006
Miguel Guirao
 
Posts: n/a
Default RE: Ajax and PHP: XMLHTTP



What do you exactly want to do?

-----Original Message-----
From: Micky Hulse [mailto:micky@ambiguism.com]
Sent: Domingo, 10 de Septiembre de 2006 10:46 p.m.
To: php php
Subject: Ajax and PHP: XMLHTTP


<?=$_SERVER['PHP_SELF']?>

Can I replace the above with some sort of XMLHTTP request?

Googling now... thought I would ask here first.

Any good links to tuts that might cover that sort of thing?

Kinda thinking about plugging some Ajax into a random image php script.

TIA. :)
Cheers,
Micky

--
Wishlist: <http://snipurl.com/vrs9>
Switch: <http://browsehappy.com/>
BCC?: <http://snipurl.com/w6f8>
My: <http://del.icio.us/mhulse>


Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos.

This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever.
Reply With Quote
  #5 (permalink)  
Old 09-11-2006
Bagus Nugroho
 
Posts: n/a
Default Starting week number of year to Sunday


Hi All,

Is anyway to change starting week number of year on Sunday, instead
Monday as default?

Thanks in advance,
bn
Reply With Quote
  #6 (permalink)  
Old 09-11-2006
Micky Hulse
 
Posts: n/a
Default Re: [PHP] RE: Ajax and PHP: XMLHTTP

Hi all, thanks for responses, I appreciate it. :)

Miguel Guirao wrote:
> What do you exactly want to do?


Oh, I wanted to call a php function on my page that changes some CSS. I
was hoping I could change my CSS on the fly without having to reload
page... but after doing more research, I think that a page refresh is
best way to go.

All the Ajax/PHP examples i have seen deal with elements on page (in
this case i have PHP script in head that changes my css)... Still new to
"Ajax" and XMLHTTP... I know how to handle JS, but I am way more
comfortable with PHP. Not too many examps on the web that show some good
techniques for calling PHP functions to manipulate CSS that I could find.

I am also not a big fan of plugging-in a huge Ajax scripting
library(ies) for something as simple as calling a PHP script to
manipulate CSS. I would prefer simple on the JS end of things and make
it more about PHP without a page refresh. :D

Lol, hope that makes sense... In a bit of a rush - headed out door to
work. :)

You guys are right though, I should probably ask on the JS listserv.

Many thanks for your time.
Cheers,
Micky


--
Wishlist: <http://snipurl.com/vrs9>
Switch: <http://browsehappy.com/>
BCC?: <http://snipurl.com/w6f8>
My: <http://del.icio.us/mhulse>
Reply With Quote
  #7 (permalink)  
Old 09-12-2006
pierre.bouvret@up.univ-mrs.fr
 
Posts: n/a
Default Re: Ajax and PHP: XMLHTTP

using $_SERVER['PHP_SELF'] is riskless as it represents "The filename
of the currently executing script", unlike REQUEST_URI

Arpad Ray wrote:
> Micky Hulse wrote:
> > <?=$_SERVER['PHP_SELF']?>
> >
> > Can I replace the above with some sort of XMLHTTP request?
> >

> As noted, that's a javascript question. However your PHP code is
> vulnerable to XSS attacks; you should at least encode the output with
> htmlspecialchars() so that URLs like
> "foo.php/<script>alert('hi');</script>" are safe.
> eg. <?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>
>
> Arpad


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:04 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0