Jump to content

birbal

Members
  • Posts

    2,543
  • Joined

  • Last visited

Everything posted by birbal

  1. you dont need to store js code in cookie. you have to specify the file name of it in the cookie.and you will use it to alter the file location later. if cookie is not there you can fallback to default stylesheet.
  2. you have to type the url in your address bar of browser. to make it happen.. you have to make sure you have web server is installed and running. you have php installed. You have to make sure file is in web root you can type http://localhost in your browser. does it show you anything? if yes then you can assume your server is working.
  3. if you are relying on only js then storing it in cookie would be the best
  4. birbal

    OOP and MYSQL

    have you yet check the manual about it? sorry, this the correct link.http://au.php.net/manual/en/pdostatement.fetch.php what properties are you referring? can you elaborate more? what are you trying to do actually?
  5. you have to open it through http protocol in browser to get it executed.
  6. what problem are you facing?
  7. you can use session to store the stylesheet name in session across pages. if you want it to remain same across session you can use cookies or in database(user specific stylesheet)
  8. birbal

    PHP Redirect

    you have to put that code in your sub page. and http://yoururl.com will be replaced with your site nameheader('location:http://yoururl.com');
  9. birbal

    PHP Redirect

    you can paste that redirect header in page1.php and point to redirect to page2.php. so that if anyone comes into page1 will be redirected to page2
  10. birbal

    PHP Redirect

    header('location:http://yoururl.com'); resource: http://php.net/header
  11. birbal

    Visitor IP

    thats bots knows your domain address. they are resolving it to get your IP and after that they are buidling HTTP_X_FORWARDED_ header with that ip and then requesting your page.. what if someone set spoofed HTTP_X_FORWARDED ? it will assume it as its ip address. you can check for those proxy headers to mark the ips as proxy but considering those address as ip address is not good idea. Where you would get at least the address of ip of the proxy server, you will get now an arbitrary ip. With that code people can fake their ip easily. they just need to set HTTP_X_FORWARDED and they are masked.
  12. You can do that with java. specificaly you have to know 'swing' and 'java networking' to build that. Either you can have a centralised server where the app will act as client and all client will be connected and talk via the cetralised server or you can make app as such that each of apps it will itself act like server and client (peer to peer) anc connected with each client and will talk via it.
  13. birbal

    Visitor IP

    HTTP_X_FORWARDED would be the original ip, but it is not obvious. as proxy server can override it and use it any aribitary ip (spoofed). There was a previous issue with that in former version of BBforum where they checked the HTTP_X_FORWARDED and user was exploited it.
  14. birbal

    Visitor IP

    I think i already did. VPN will work same as proxy server between client and target server. so it is same as above.
  15. More resouce on the concept of MVC http://anantgarg.com/2009/03/13/write-your-own-php-mvc-framework-part-1/http://www.tonymarston.net/php-mysql/model-view-controller.htmlhttp://www.phpro.org/tutorials/Model-View-Controller-MVC.html
  16. birbal

    Visitor IP

    $_SERVER['REMOTE_ADDR'] can't be spoofed actualy because that is the ip address through which server and client send data back and forth. when someone use proxy , that remote server act as client and request page from the target server. which means they talk to via proxy server ip address and target remote address. so 'REMOTE_ADDR' become the address of proxy server. $_SERVER['HTTP_X_FORWARDED'] is non standard header. it is what the proxy server set when it request target server. but it is up to the proxy server what will be the value of it or even it will be there or not. there is many more headers used there to determin e proxies but it would vary from server to server. this headers can be spoofed. You can check those all proxy headers exist or not but i doubt all proxies could be caught via that. There is not any reliable way of doing that.
  17. birbal

    OOP and MYSQL

    if you use pdo there is option to fetch data as object setting fetching mode using PDO::FETCH_CLASS or PDO::FETCH_OBJhttp://php.net/pdo.fetch <=PDOstatement::fetch()
  18. how does your date is stored? timestamp or date object?
  19. probably have. i am not sure about that. you can tweak that though if you have the source code. i had implemented that but that was custom forum apps which i developed from scratch.
  20. dont you feel uncomfortable working on laptop/netbook? i am curious to know its configuration.
  21. do you develop in laptop? i can see two huge screen on your avatar. i thought that is where you work on.
  22. Please,here share your computer configuration you work on or use for software development. please try to be as detailed as possible. if it is more than one system feel free to add them too.
  23. I was not aware of google TOS. if it is like that. it would be best not to mess with google. another option could be revealing the topic's original post be public but not the answer. at least bots can know and see what is all the page about. I have seen some of them and honestly it is too iritating
  24. birbal

    Security

    There is another better option for that. you can log http://php.net/error_lo your errors in separate file and put error_display directive off. or you can override the default error handling http://php.net/se_error_handler. it is effective for not only for include as well as every kind of error. revealing error publicaly is another vulnerability. I would not spare some function call (on each page request by many users) to check the existence of file before including as include file mostly expected not to change its location specialy when it is hardcoded. in rare case if it happens error log or overriding error handler will tackle that nicely.
×
×
  • Create New...