Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I need to verify if a browser meets the requirements of our website. If one of the requirements is not met, I'd like to display a corresponding warning on the login page. The requirements are the following:
Cookies must be enabled
Javascript must be enabled
HTML5 must be supported
IE9+
What's your approach to this problem? Can you e.g. recommend an open source library (Javascript, PHP, Zend Framework 2) I can use to do the job? Or is there a good diagnostics website I can refer to for checking browser requirements? Verifying the requirements will save us a lot of support time.
Looks like http://detector.dmolsen.com/ could be of great help. It can be combined with the well known http://modernizr.com/ too!
you can check if 1st party cookies are enabled by setting and reading a cookie from javascript. You can do the same with 3rd party cookies by doing an ajax request to a php file
its a tough one
you can't detect if "html5" is supported but you can detect if certain javascript functions are enabled (http://diveintohtml5.info/detect.html)
if you are using jQuery you can go with
if (jQuery.browser && jQuery.browser.msie && jQuery.browser.version > 9)
unfortunately the latter doesn't work with jQuery version > 1.9.1
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm trying to simulate a web browser in order to log into a secure site, where the site's backend seems to be written in some mix of PHP and ASP.NET, and retrieve some user details.
In order to fit my own project, the simulation results (i.e. the user details) must be returned to a PHP script for processing.
So far I've been working with CURL in PHP to do this, and realised that the site is far too complicated to use CURL effectively, and this method is far too slow to develop. What I would like is some sort of browser simulator that can:
Execute JavaScript
Submit forms
Click links
Handles cookies
Uses ASP.NET postbacks
Can access the DOM
Basically something that behaves exactly like a real browser, and can return the page source to me.
I've explored the Snoopy class in PHP and Capybara in Ruby. If I don't get any better options I will be forced to implement with one of these.
You have two options:
Use a headless browser. This is basically browser without any graphical output, which can be controlled via. code. You can check out Selenium and PhantomJS, there probably exists bindings for your language of choice.
Reverse their site. Do the login flow and actions needed to get to the resource you need, and look at the network traffic, for example with Chrome's developer tools. Look at the requests, headers and form data needed for the endpoints in question and emulate that in the code.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I was looking at the hack language of Facebook but I have a server running several php sites.
Now I was wondering if there is a tool that can convert hack back to php, so it can be run it on my server but I can develop in hack?
Hack is neither a subset nor a superset of PHP -- we've been calling it a "dialect". While writing a tool to convert many (but not all!) features from Hack to PHP might be possible right now, we don't believe it to be a good idea. This thread has some discussion and elaboration on why: https://github.com/facebook/hhvm/issues/2236 (Super short summary: you really want the runtime to be enforcing your type annotations.)
As that thread says, we do want a better PHP conversion story than we have right now, particularly for frameworks that don't want to convert over to Hack wholesale (since they'd lose most of their users/customers :)). We don't have anything yet, but have some ideas we haven't gotten around to working on yet.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Can anyone suggest any good cURL based PHP browser / spider / crawler / http / file download libraries..?
I just want to have a tool for downloading content from URLs, like I would do with implode('', file(url)) or file_get_contents(), but it should support timeouts, HTTP code responses, custom headers etc.
cURL is awesome, I've been using it for a while in a function I created, but I want an encapsulated 3rd party library. Sure there must be such.. I made a search, but I couldn't find exactly what I wanted.
You can try this http://simplehtmldom.sourceforge.net/
Is a php library for parsig/downloading content.
I was using PHPCrawl for my web crawler project. It is purely standalone library, without dependency of cURL.
It provides functions to recursively download content of given URL, and support pattern matching and timeout. Then you can do whatever you want with the retrieved URL content. Oh yes, it can give you the HTTP response status. But not sure for custom headers.
I wrote my own pretty decent function using cURL: http://pastebin.com/4CPaCfMm
It works, but I just though I could search for a more advanced OOP tool that I could use in my projects, that would get maintained and furthur developed - a library.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Is there any library that, given a sqlite/mysql/postgres database generates an admin panel to manage data à la Django? I know that some frameworks do this, but I need something indipendent from any other part of the application that relies solely on a given database to work.
I need something end-user oriented, so any sql-based tool (like phpMyAdmin) would not work. Thanks
Thanks.
Here are a couple of suggestions for use with mysql:
http://www.ajaxcrud.com creates an ajax crud interface. The main page provides a good example with code, and there are more advanced examples on the site as well.
There is also http://www.phpscaffold.com/ which you can use to create some skeleton pages if you prefer to have more control.
I have used both of these previously in projects and they work well.
You can check PHP Admin Panel.
It's not free but it's not expensive for what you can do.
How about Adminer Editor? It's pretty cool.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Is there a PHP Sandbox, something like JSFiddle is to JS?
If you are just looking for an online site to play around with PHP code, try
http://phpfiddle.org/
http://ideone.com/
https://codeanywhere.net/
http://www.tehplayground.com/
http://sandbox.onlinephpfunctions.com/
http://codepad.org/
https://eval.in/
https://implode.io/ (permits attaching a version of the Laravel framework)
The most sophisticated is:
http://3v4l.org/
It lets you test your code in all PHP versions starting from PHP4.
If you want something for your local environment, the Runkit extension aims to provide a PHP Sandbox:
Instantiating the Runkit_Sandbox class creates a new thread with its own scope and program stack. Using a set of options passed to the constructor, this environment may be restricted to a subset of what the primary interpreter can do and provide a safer environment for executing user supplied code.
If you dont want to use Runkit but still want a PHP Console on your server, try
Jordi Boggiano's Blog - PHP Console in Your Browser
http://github.com/seldaek/php-console