Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I'm using laravel + vuejs. I have a situation in which I need to have screen height in laravel/server-side. I know its easy on vuejs side but I need it in laravel side because I'm using pagination and I'm sending elements per page from laravel side. I have to know the screen size to calculate the items per page in server-side.
Thank you for the help
You could set cookies on the client side via JS.
And read it on the back-end.
Usually this is not available to the server. Techniques used to adapt to the screen size are well developed in CSS, though.
If you really need it (for statistics?) You can send it from JavaScript to an AJAX endpoint in Laravel.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I'm new to Laravel, I want to update the interface every time there is a change in the database but I think calling a JavaScript every 5s to update the interface is not very efficient, so I wonder what is the most efficient way to do that?
Have you considered using some for of websocket to create a connection between your backend and JavaScript based UI?
Either https://laravel.com/docs/master/broadcasting or https://github.com/beyondcode/laravel-websockets would allow you to notify your UI to request the updates from your Laravel backend.
My personal suggestion would be that you JS would receive a notification that something had changed and then have to obtain the updated information via Ajax so that you are not sending confidential information through Pusher's servers.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I want to take pictures from my PHP server and put it into my android ListView
I am using the code example in https://www.simplifiedcoding.net/android-programming-tutorial-to-get-all-images-from-server but this only gets all of the images and shows them one by one.
You should really try to be using Android Volley for data transfers. It is developed by the Android team and is the recommended convention.
http://developer.android.com/training/volley/index.html
And as far as your list view goes, unless you have some specific reason to use it, you may want to look into Recyclerview. It handles most of the loading and view holding issues. http://developer.android.com/training/material/lists-cards.html#RecyclerView
Use android picasso library to get images to your app via url, its very easy to use.
checkout this tutorial on the use of picasso
http://javatechig.com/android/how-to-use-picasso-library-in-android
hope this help.
Another option is universal image loader. https://github.com/nostra13/Android-Universal-Image-Loader
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
The title says it all. Please give me some way for how to scrape AJAX loaded Division.
There is one website which has Product Grid Division. I want this division for scrap the data from it but the problem is when i get the page content data in another html page there is no product grid because it's loaded via AJAX after some time. For Scrapping i tried both Perl and CURL with PHP.
Thanks in advance.
From WWW::Mechanize::FAQ
Which modules work like Mechanize and have JavaScript support?
In no particular order: Gtk2::WebKit::Mechanize, Win32::IE::Mechanize,
WWW::Mechanize::Firefox, WWW::Scripter, WWW::Selenium
Also see: How do you scrape AJAX pages?
Using Selenium, e.g. through Selenium::Remote::Driver, you will be operating real browsers to access the site. Sites can be quite sensitive to subtle differences in browser behavior.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is there a posibility that i can convert my php website to an mobile app or i should convert it into html then convert it to mobile app??
No, you cant run php client side. You should just make it a responsive website
There are multiple technologies. You will need to adjust your HTML/CSS to cater for how they work, but it is possible. I'd suggest looking at PhoneGap
PHP is server-side language and that gives HTML page output after execution at server-side so that is not possible.
But You can use native browser of that os e.g. for android webview.And can load your page into it.
Another option is PhoneGap but it slow down application than Native.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to build a chat application using PHP. Does anybody have any idea about it? If so please reply.
The chat application must be user friendly, multiple chatting scenario must be there.
Sounds pretty straight forward.
Ajax-polling front-end -> chat_handler.php -> backend database
Done.
If you want to create a "Shoutout" type public chat system, it's pretty easy to achieve via PHP/MySQL/jQuery.
You just have to take input from a form. jQuery will submit values to a database via a backend php file.
To refresh the submitted messages after regular intervals you can use setInterval function availabe in jQuery.
Maybe this will help:
http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-simple-web-based-chat-application/
just buy one if you don't want to code. Comet Chat is a good one, like Faceb00k. Just google