Tag Archives: url

Google Adsence ads are blocked if utm_hash query parameter is added to url

Questions: if I i load my page without any parameter then google ads are shown. Even with utm_source and utm_medium query parameters ads are shoing up but when i add utm_hash to the prameter ads are blocked. example.com/?utm_source=fb&utm_medium=social ads are showing up. example.com/?utm_source=fb&utm_medium=social&utm_hash=abcde ads are not showing up. I am using google analytics and adsense… Read More »

Issue with curl check cpanel authentication

Questions: I create a function to check cpanel. (input : host,link,password) (output: return true if valid or false if invalid) This function works perfectly on localhost. The issues come when I upload my script on web hosting. It doesn’t work. It’s the same version of PHP 5.6 on my localhost & web host. function cpanel_check($host,$user,$pass,$timeout=5){… Read More »

How to get the request URL for a Retrofit object?

Questions: I need to log the request URL that Retrofit creates. I don’t find any getter methods on Retrofit object or web interface that is generated via Retrofit. The following is my code, where I want to log the address of every request: public void onRequestFoods() { Retrofit retrofit = new Retrofit.Builder() .baseUrl(Const.BASE_LOCAL) .addConverterFactory(GsonConverterFactory.create()) .build();… Read More »

How to install php-curl in Ubuntu 16.04

Questions: Upgraded to Ubuntu 16.04 and facing problem after installing PHP5. Installed PHP-5 with following: sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get upgrade sudo apt-get install php5.5 # for PHP 5.5 Trying to install php-curl but its not working. sudo apt-get install php5-curl Error: E: Unable to locate package php5-curl Answers:

Laravel 4.2: Force URL to be rendered as HTTP or HTTPS

Questions: We have a simple route defined like the following one: Route // Home Route::get(‘/home’, [ ‘as’ => ‘home::index’, ‘uses’ => ‘IndexController@home’ ]); View <a href=”{{ route(‘home::index’) }}”>Home</a> We need to force our link/route in view rendered as HTTP or in some cases as HTTPS route e.g. http://host.domain/home or https://host.domain/home. We cannot use URL::forceSchema(“http”) or… Read More »

On clicking the listview item the url should be opened in a browser , but on running the app it runs fine but the onclick listview does'nt work

Questions: In my app, the listview populates easily but the list click doesnt work. The app does not crash and there is no error log also. When i add the line //lv.setOnItemClickListener((AdapterView.OnItemClickListener) this); , the code produces error about addView(View, LayoutParams) is not supported in AdapterView. i have tried different solutions but any of them… Read More »

What is the correct url to access an file via AJAX?

Questions: To contextualize: There is a remote directory, clearing-dit\logs, which has a series of logs (portal.log, test.log, …). This directory is mapped to an HTML page, where all your .log’s are displayed. Once one of them is clicked, its respective content is displayed. Exemple Currently, I’m using thymeleaf to show the content: <html xmlns:th=”http://www.thymeleaf.org” th:include=”layout… Read More »

Pass form data through url by setting in route

Questions: I have set a route in my Laravel project, if it was with href I would have done it like this {{route(‘destination’),$country_from,$country_to}} but now I want to pass in the form data as the $country_from and $country_to please how can I do this <form action=”{{route(‘destination’)}}”> @csrf <input type=”text” class=”search-form flexdatalist” name=”origin” placeholder=”country_from” data-search-in=’name’ data-min-length=’1’… Read More »

How to set as wallpaper from a String list/Url

Questions: Hello guys I’m creating an application of Wallpapers where I’m fetching all the images from Firebase database which are in String format. Now I’m stuck on Set As Wallpaper because the images are in Url format and the wallpaperManager.setResource(int) only supports int formate. I have also tried to convert Url to Bitmap but its… Read More »

How to make pagination in Laravel when the URL length exceeds its limit

Questions: I am working on a project with Laravel 5.2 I have hidden ID values and I want to search the ID from the database and later I will sort it in descending order. I wrote this code. Controller $jsonObject =json_decode(request(‘membersdata’)); $member = (new Membermasternewdata)->newQuery(); $members=$member->whereIn(‘id’, $jsonObject)->latest(); $members=$members->paginate(50); View The HTML page {{$members->appends(request()->except(‘page’))->links()}} My URL… Read More »