website.ru / # get

Actually you need to get the value of get PHP. Any ideas?

    3 answers 3

    As an option, we get through javascript

    function get_piece_url() { return var purl=location.search.substring(1); } 

    And this received piece of the address is sent to the server for processing by means of php.

      Do not pull it with php smiles .. skiped server all that after

      There was the same problem .. solved using js. They can get there ..

      • Option with JS has already been considered. I 'll wait for grand ideas yet) - Palmervan
      • I am pleased to wait for a grandiose decision) The most interesting .. :) - draev
      • 2
        > I will wait for grandiose ideas yet) It will take a long time to wait. IMHO, browsers will start to transfer to the hashmark server and not earlier than never :) - Ilya Pirogov
      • Thank you, JS vparil!) - Palmervan
       $url = parse_url("сайт.ру/#get"); $fragment = $url['fragment'];//тут и будет Ваш get 

      Manual: parse_url

      • As a parsit I know, I first need to pass the address bar to $url , and then parse $url ! - Palmervan
      • one
        Then the only way to use it in PHP is to make an ajax request from js and include the hash value as some normal variable in the request. in <code> window.location.hash </ code> - Maksym Prus