views:

80

answers:

2

Is it possible to get every request to server using Javascript or PHP if javascript not possible ? Thx for helping me...

A: 

With PHP you should be able to get all server requests with

$_REQUEST

http://us.php.net/manual/en/reserved.variables.request.php

Scott Radcliff
This is for request **variables**, not requests.
OcuS
+1  A: 

No, neither Javascript nor PHP will allow this. Your server, however, is probably already logging all requests. Apache does and I'm sure just about all other web servers do the same. You can read those log files with PHP if you need to display something from them in a web application. There are also numerous "log analysis" applications you can use to see the requests in a more graphic form.

Scott Saunders
Hmmmm... What do you think about what this website http://www.websiteoptimization.com do, Scott? We can give a url then it will give you every detail request that requested by the url. All I ask is about what that website is doing... Thx for explanation.
Riza Dwi Arifiyanto
Do you just want a list of all the images, css and javascript files that are included when you load a single page? It's easy to do that. (Though it's not my definition of "every request to [a] server.") The Firebug extension for Firefox is the best way I know. Add that extension, open it up, click on the 'Net' tab and visit a page. It will show you lots of detail about included files.
Scott Saunders
hehe... everybody know about it :) the point is i want to make my own page like websiteoptimization.com on php. i need to build my own tool. thank u so much..
Riza Dwi Arifiyanto
Well, download the page and time it. Parse it and find any other files that should be downloaded. Then download those and time those downloads. Compare the file sizes, whatever else you need to do. You can do that in php. Look at the fopen() function.
Scott Saunders