[Solved] how can I get image in special url [closed]

What do you mean by getting an image by that URL? You need to rewrite the URL with htaccess and intercept it somehow using PHP and loading the file from somewhere. Once you have the image you can get any info you want to from it. Rewrite URL with mod_rewrite (i.e.: domain.com/23234234/0 to domain.com?id=23234234&nr=0) Make … Read more

[Solved] How to Add Prefix in WebView URL?

In the onClick() method of the button, just concatenate url and the query. @Override public void onClick(View view) { String url = urlEditText.getText().toString(); String prefix = “https://www.google.com/search?q=”; if(!url.startsWith(“http://”) && !url.startsWith(“https://”)) { url = prefix + url; } if(url.endsWith(“.com”) || url.endsWith(“.as”) || url.endsWith(“.uk”) || url.endsWith(“.biz”)) { if(!url.startsWith(“http://”) && !url.startsWith(“https://”)) { url = “http://” + url; } … Read more

[Solved] Group values with common domain and page values

Use defaultdict() to collect parameters per url path: from collections import defaultdict from urllib import quote from urlparse import parse_qsl, urlparse urls = defaultdict(list) with open(‘links.txt’) as f: for url in f: parsed_url = urlparse(url.strip()) params = parse_qsl(parsed_url.query, keep_blank_values=True) for key, value in params: urls[parsed_url.path].append(“%s=%s” % (key, quote(value))) # printing results for url, params in … Read more

[Solved] How to make an Instant Shorten link for a url shortener

Usually a bookmarklet something like this is used: javascript:u=encodeURIComponent(location.href);s=”http://urlshortener.com/shorten.php?url=”+u;window.open(s,’shortened’,’location=no,width=400,height=300′); That takes the URL of the current page and opens a new window pointing to urlshortener.com/shorten.php?url=[the url to be shortened]. The code used by YOURLS is more complicated, but probably does approximately the same thing. You just need to change the URL that the new window … Read more

[Solved] Web Scraping From .asp URLs

I would recommend using JSoup for this. To do so add below to pom.xml <dependency> <groupId>org.jsoup</groupId> <artifactId>jsoup</artifactId> <version>1.11.2</version> </dependency> Then you fire a first request to just get cookied Connection.Response initialPage = Jsoup.connect(“https://www.flightview.com/flighttracker/”) .headers(headers) .method(Connection.Method.GET) .userAgent(userAgent) .execute(); Map<String, String> initialCookies = initialPage.cookies(); Then you fire the next request with these cookies Connection.Response flights = Jsoup.connect(“https://www.flightview.com/TravelTools/FlightTrackerQueryResults.asp”) … Read more

[Solved] How to post form value to url and database using php [closed]

First of all, break your code up into sections and test each section. First, test that you have received the data correctly. A single error can stop the entire page from processing, so ensure you are receiving what you think you are receiving: $name = $_POST[‘name’]; $phone = $_POST[‘phone’]; $email = $_POST[’email’]; …etc… $zz = … Read more

[Solved] How Do I Change Firefox Homepage In VB Code

If you want to change the Firefox’s home page form a program running on the user’s computer, you have to edit the prefs.js file and create a new line like user_pref(“browser.startup.homepage”, “http://www.example.com/”);. Beware that if there are multiple browser.startup.homepage entries every entry will be opened in a new tab when the browser starts up, and … Read more

[Solved] python url extract from html

Observe Python 2.7.3 (default, Sep 4 2012, 20:19:03) [GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9 Type “help”, “copyright”, “credits” or “license” for more information. >>> junk=”’ <a href=””http://a0c5e.site.it/r”” target=_blank><font color=#808080>MailUp</font></a> … <a href=””http://www.site.it/prodottiLLPP.php?id=1″” class=””txtBlueGeorgia16″”>Prodotti</a> … <a href=””http://www.site.it/terremoto.php”” target=””blank”” class=””txtGrigioScuroGeorgia12″”>Terremoto</a> … <a class=”mini” href=”http://www.site.com/remove/professionisti.aspx?Id=65&Code=xhmyskwzse”>clicca qui.</a>`”’ >>> import re >>> pat=re.compile(r”’http[\:/a-zA-Z0-9\.\?\=&]*”’) >>> pat.findall(junk) [‘http://a0c5e.site.it/r’, ‘http://www.site.it/prodottiLLPP.php?id=1’, ‘http://www.site.it/terremoto.php’, ‘http://www.site.com/remove/professionisti.aspx?Id=65&Code=xhmyskwzse’] … Read more

[Solved] append the URL so that it will not give 404 [closed]

To append vars to the end of a url, the first one needs to start with the question mark (?), with subsequent variables added with an ampersand (&). For example: ‘http://my.site.com/index.html?variable1=hello&variable2=goodbye’ This can be done for “any number of specific reasons” solved append the URL so that it will not give 404 [closed]

[Solved] Objective c: download a file with progress view [closed]

You can get expected total file size in following callback method of NSURLconnection, – (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { expectedTotalSize = response.expectedContentLength; } then in the following callback method you can calculate how much data has been recieved, – (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { recievedData += data.length; } And you can use UIProgressView to show … Read more

[Solved] Get url & change it on click

Pretty simple… Set up a click event handler on the button, get the location, adjust the string, set the URL. // Get button reference var btn = document.getElementById(“btn”); // Set up click event handler btn.addEventListener(“click”, function(){ // Get current URL var url = window.location.href; console.log(url); // Change a portion of the string // Obviously, change … Read more