w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why does git fetch fail with "Could not resolve host: (nil)..." with https://github.com/mxcl/homebrew origin?
You remote URL is incorrect, it should be https://github.com/mxcl/homebrew.git (.git postfixed) instead of https://github.com/mxcl/homebrew. You can copypaste URLs from Github UI to prevent such typos.

Categories : GIT

wget and curl somehow modifying bencode file when downloading
For the file retrieved using the command line tools I get: $ file 6760F0232086AFE6880C974645DE8105FF032706.torrent 6760F0232086AFE6880C974645DE8105FF032706.torrent: gzip compressed data, from Unix And sure enough, decompressing using gunzip will produce the correct output. Looking into what the server sends, gives interesting clue: $ wget -S http://torrage.com/torrent/6760F0232086AFE6880C974645DE8105FF032706.torrent --2013-06-14 00:53:37-- http://torrage.com/torrent/6760F0232086AFE6880C974645DE8105FF032706.torrent Resolving torrage.com... 192.121.86.94 Connecting to torrage.com|192.121.86.94|:80... connected. HTTP request sent, awaiting response... HTTP/1.0 200 OK Connection: keep-alive Content-Encoding: gzip So the server does report it's sending gzip compressed data, but wge

Categories : Linux

How do I resolve "Missing host to link to! Please provide the :host parameter"? (RoR)
The problem may be that you have not defined default_host for test environment. Define default_host inside config/environments/test.rb like this: config.action_mailer.default_url_options = {:host => "localhost:3000"}

Categories : Ruby On Rails

Amazon S3 HTTPS not loading with Chrome and wget on Linux
works here in Ubutnu Linux with Chromium and with wget. It only works in wget if you put " " around the URL, which contains special characters. Otherwise I do get 403 forbidden. I receive a jpeg file, 5.1k. It looks like the same drawing I get on chromium. The URL produces a picture of some kind of rough drawing with black lines. wget version is 1.13.4 chromium about: Chromium 25.0.1364.160 (Developer Build 25.0.1364.160-0ubuntu0.12.10.1) Ubuntu 12.10 OS Linux WebKit 537.22 (trunk@137939) JavaScript V8 3.15.11.16 Flash 11.2 r202 User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22 Command Line /usr/lib/chromium-browser/chromium-browser --flag-switches-begin --sync-keystore-e

Categories : Linux

Canon SDK - Downloading image to host PC
When you call EdsCreateFileStream, just prepend the fully qualified path where you want the file to go. dirItemInfo.szFileName is the file name only, so the image should appear in your working directory if you don't include a path.

Categories : C++

Unable to resolve host: URL No address associated with hostname
I fixed it by removing these lines HttpParams httpParams = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(httpParams, 3000); HttpConnectionParams.setSoTimeout(httpParams, 7000); DefaultHttpClient httpClient = new DefaultHttpClient(httpParams); And replacing it with this code HttpClient httpClient = MainActivity.createHttpClient(); public static HttpClient createHttpClient(){ try { KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType()); trustStore.load(null, null); SSLSocketFactory sf = new MySSLSocketFactory(trustStore); sf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); HttpParams params = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(params, 15000);

Categories : Android

Youtube API client error cannot resolve host
There seem to be two errors here, and I suspect they are issues with your server or network: Verify that whatever account is executing PHP has the right permissions. /tmp should be writable by all, but there might be something weird going on. As jlmcdonald suggests, check for space. From your server, verify that you have connectivity. This could be any number of reasons: DNS issues or general connectivity. You can troubleshoot these by SSHing into your server and running: Checks for DNS issues nslookup googleapis.com Checks for general connectivity ping googleapis.com This shouldn't be necessary, but checks to see if your server can even open an outbound socket on that port (ping = ICMP) telnet www.googleapis.com 443

Categories : PHP

nginx proxy based on host when using https
according to http://www.informit.com/articles/article.aspx?p=1994795, you should indeed have two "server" sections, with two different server names. In each one, you should include your ssl_* directives.

Categories : Ssl

Connecting to https host with soapclient: how to fix SSL problems?
Interesting. Try adding this: wget https://[[SERVER]]/soap/ —post-file=request.xml —header=”Content-Type: text/xml” -O response.xml This will save the result as a file named response.xml.

Categories : PHP

Could not resolve host exception when calling Dns.GetHostAddresses(Dns.GetHostName())
Stolen from Mike Bluestein in the forums foreach (var netInterface in NetworkInterface.GetAllNetworkInterfaces()) { if (netInterface.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || netInterface.NetworkInterfaceType == NetworkInterfaceType.Ethernet) { foreach (var addrInfo in netInterface.GetIPProperties().UnicastAddresses) { if (addrInfo.Address.AddressFamily == AddressFamily.InterNetwork) { var ipAddress = addrInfo.Address; // use ipAddress as needed ... } } } }

Categories : IOS

Htaccess rule to resolve the 404 error when host name is repeating twice
Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+.+?(/forum/[^s]+) [NC] RewriteRule ^ /%1 [R=302,L,NE] Once you verify it is working fine, replace R=302 to R=301. Avoid using R=301 (Permanent Redirect) while testing your mod_rewrite rules. Explanation: %{THE_REQUEST} represents the original request as received by Apache which in your case may look like: GET /http://www.example.com:80/forum/viewtopic.php?f=5&t=221&‌​st=0&sk=t&sd=a&start=10 HTTP/1.0 Breaking down my regex: ^[A-Z]{3,}s/+.+?(/forum/[^s]+) now This part of regex ^[A-Z]{3,}s matches 'GET ' part

Categories : Htaccess

How to host Web app on Azure's Windows Server 2012R2 VM (and resolve new site names)?
You can setup as many web servers as you like. You could expose them externally using different ports or different domain names. To do this using different domain names you would need to setup the CNAME records with your DNS provider to point to something.cloudapp.net and setup IIS to bind to only the correct domain name. (http://www.domainmonster.com/glossary/dns/cname/) To do this using ports you would need to run your sites on different ports and allow incoming traffic on these ports. (http://social.msdn.microsoft.com/Forums/windowsazure/en-US/28100eb3-6e9b-4012-a273-84062f4e293a/azure-firewall-how-to-allow-outbound-and-inbound-traffic-on-vm) The best solution may be to run nginx/apache on port 80/443 and then use that as a reverse proxy to IIS.

Categories : Dotnet

java.net.UnknownHostException(Unable to resolve host "play.googleapis.com": No address associated with hostname)
Most common reason for UnknownHostException is missing Internet-Permission. Check your AndroidManifest.xml for <uses-permission android:name="android.permission.INTERNET"></uses-permission> Update: later comment says, internet connectivity is allowed and it works on device. So it's emulator issue. Possible solutions: use IP instead of hostname (for a test) re-create the AVD check min-SDK seetings against AVD sdk version

Categories : Android

orde links by their hosts - from a multi link textarea to a table ordred by host (colomn n = host n contains all links of that host)
According to what you've described , you just need a function that will sort the links by the abc. function just_host($link) { return array_shift( explode( '.', str_replace('www.', '', parse_url($link, PHP_URL_HOST)))); } $multi = $_POST['multi_links']; //$_Post is not right , all upper-case! $links = explode(" ", $multi); $links = array_map($links , 'just_host'); //Call the 'just_host' for every link and update the value in the array. sort($links); //Sort the array foreach($links as $link) //Instead of 'for' , use 'foreach' { echo $link . "<br />"; } Should work , please update me if not and I'll edit it.

Categories : PHP

Downloading process killed by os while downloading multiple sound files via Download Manager in android
It there is a bug in download manager, as discussed here. Download manager will automatically re request files/tracks failed due to network connectivity problems. But it is failing to serve, when multiple and repetitive requests are made. It is storing data about failed or partially downloaded files in download manager application cache. whenever it is implicitly downloading again, it is using previous data, which is not accurate to make some range requests. That is why it is always failing give either range request failed or error can not resume after multiple or repetitive downloads. Manual Solution go to settings-> manage applications-> download manager (under all tab)-> clear data After doing this you can observe success rate as very high. In order clear download manager data th

Categories : Android

While downloading something at the same time on label it should write downloading c#
For windows app, I think the best would be to use BackgroundWorker and Dispatcher.Invoke() for updating label's text. private void button1_Click(object sender, EventArgs e) { //Update label text here.. BackgroundWorker _backgroundWorker = new BackgroundWorker(); _backgroundWorker.DoWork += _backgroundWorker_DoWork; _backgroundWorker.RunWorkerAsync(); } void _backgroundWorker_DoWork(object sender, DoWorkEventArgs e) { Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Background, new Action(delegate() { //Download code here.. })); }

Categories : C#

How could a local user on a host use a buffer overflow attack to get root access to the host?
Usually, it's about exploiting a vulnerability in a process that runs as root: Either a server that accepts connections (sockets, pipes, etc.) or an executable with the SETUID flag. If by "gain root access" you mean take control of a shell running as root, the buffer overflow payload must start a shell and use dup2 to redirect its input and output to something the attacker controls (such as a socket connection to a "command and control" server running on the attacker's machine).

Categories : C

How to transfer a Wordpress site from Bitnami (local host) to a live host online?
I had a similar problem. To get my particular site working, I added the following code to my configuration file: define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com'); After adding the lines, my CSS and uploaded images came back. Don't forget to replace example.com with your site's domain name. I found that code at: http://codex.wordpress.org/Changing_The_Site_URL. Actual user results may vary.

Categories : Wordpress

PHP verify Baidu search engine by host when web host DNS server returns only IP
I was able to use a different DNS server via the host command via shell... $p = trim(trim(explode(' pointer',shell_exec('host -W 2 180.76.5.168 68.238.96.12'))[1]),'.');

Categories : PHP

MySQL "Unable to connect to host [host] because access was denied."
Did you issued the flush privileges after granting access to the wildcard user? What happens if you add an entry with user = sadmicrowave and host = [your actual ip] (don't forget to issue the flush privileges command after adding the user) ?

Categories : Mysql

Facebook like button https issue: protocol mismatch from http and https
Reviewing the js code on Facebook there are multiple urls containing hard coded strings for http://static .../rsrc.php it's possible those are the files triggering the error. This may be something Facebook needs to update. On a side note, it may be possible to download that js file from Facebook and store it on your server and remove the hard coded http string. I would test this further but I am on my phone at the moment.

Categories : Facebook

when using https, https can't find codeigniter controllers. Running Centos
Change this line : RewriteRule ^(.*)$ index.php?/$1 [L] to : RewriteRule ^(.*)$ /index.php?/$1 [L] The .htaccess would otherwise be redirected relatively to a index.php in the join folder, which off course is not there.

Categories : PHP

How do you enable https and http->https redirects in ring / compojure
It's possible to serve HTTPS with clojure, but it's much more popular to put nginx or something like that in front of your ring server. If you can figure out how to configure jetty, though, run-jetty clearly supports SSL.

Categories : Http

Once https page is visited, all subsequent pages are served from https
ok I think I found the reason. The links I am visiting are relative, so "/forum" for example. Once https is in the browser it seems like visiting a relative address is leaving the root as https:// and appending the relative path. I believe the fix here will be to use the full path for the link instead of relative.

Categories : Htaccess

How can i convert links to https when server providing https?
If you remove the http:// portion and use instead: <script type="text/javascript" src="//static.monstermmorpg.com/js_files/jquery-1.9.1.min.js"></script> It should request based on the current scheme being used.

Categories : C#

Can https fallback to http and security level of https
No, HTTPS never falls back to HTTP automatically. It would take deliberate action by the user. If you're just going to a web page by putting its URL into the address bar, this is easy; for form submission it's harder. Yes, sending plain text over SSL is fine. In fact, sending a hashed password doesn't really increase security much at all -- if someone manages to sniff the connection and gets the hashed password, that's all they need to be able to login to the site. It has one small advantage: if the user uses the same password at multiple sites, learning the hashed password for one site doesn't help them get into another site that uses a different (or no) hash. And it's not likely to be feasible to send salted hashes, since the client doesn't know the salt. A cnonce adds an extra level

Categories : Asp Net

Redirect all http AND https non-www URLS to https://www.xyz.com via htaccess
In case anyone from the future (HELLO PEOPLE OF THE FUTURE) stumble across this, I asked the same question and had it answered over at Server Fault. Short version: impossible. Long version: http://serverfault.com/questions/523199/redirect-all-http-and-https-non-www-urls-to-https-www-example-com-via-htaccess

Categories : Htaccess

WCF service streaming - Console host vs. IIS host
How do you know its buffered? Check the config file on the client side after proxy generation. Sometimes the proxy generated config file has incorrect transfermode. When you start writing the file on the client, don't any see any chunk wise increase in the size of file? The hosting shouldn't affect the transfermode. The only difference between IIS and Console would be the way activation/deactivation is managed.

Categories : Wcf

HTTPS GET request to https://www.googleapis.com/plus/v1/people/me
Create a Google_Oauth2Service object (put it under the $plus initialization), like: $client = new Google_Client(); $plus = new Google_PlusService($client); $oauth2 = new Google_Oauth2Service($client); and after succesfully authenticating the client use: $userInfo = $oauth2->userinfo->get(); $email = $userInfo['email'];

Categories : PHP

IHttpHandler to redirect "https://example.com" to "https://www.example.com"?
If you use IIS7, you might want to try URL Rewrite Module. http://www.4guysfromrolla.com/articles/072810-1.aspx http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/

Categories : Asp Net

wget with GET parameters?
There is no GET parameters in there, just a path. X-Auth-Token is a custom header. Try: wget -d --header="X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb" http://ipadress/get/v1/AUTH_test/test/test.jpg

Categories : Linux

Comet with curl or wget
I think you are referring to that one facet of Comet where a server-client connection remains open on an unfinished http request for a long(ish) period of time. I honestly don't think that it would be wise to do that with simple scripting of wget or curl, however it's completely possible to use libcURL (the library that cURL is built around) for such a purpose. Daniel Stenberg, author of cURL and libcURL himself said so: AFAIK, COMET is just HTTP done in a slightly funny way but still plain HTTP and libcurl should be able to do it fine. Even if COMET also is a what wikipedia calls an "umbrella term" which seems to include a lot of different approaches. Just one thing (re the socket remark): do realize that "below" whatever solution you'll choose there will be a socket tran

Categories : PHP

MAC OSX LION: gcc on mac not compiling wget
Honestly, even though it appears that gcc exists; but does it point to a valid install? It still sounds like it is not installed properly and with an upgrade to Mountain Lion, all your open source tools have been scrubbed away and pushed to Xcode and must be manually installed if necessary.

Categories : C++

Post request with Wget?
man wget says: Only one of --post-data and --post-file should be specified. The full paragraph is: --post-data=string --post-file=file Use POST as the method for all HTTP requests and send the specified data in the request body. --post-data sends string as data, whereas --post-file sends the contents of file. Other than that, they work in exactly the same way. In particular, they both expect content of the form "key1=value1&key2=value2", with percent-encoding for special characters; the only difference is that one expects its content as a command-line parameter and the other accepts its content from a file. In particular, --post-file is not for transmitting files as for

Categories : Linux

Node.js exec with wget
This will involve some debugging. Can you please try running your script as: var cmd = 'wget -O output.csv URL'; var child = exec( cmd, function (error, stdout, stderr) { console.log('stdout: ' + stdout); console.log('stderr: ' + stderr); if (error !== null) { console.log('exec error: ' + error); } } ); It would be interesting to see what stdout and stderr say. Right, you provided me your stderr which said: http://productdata.zanox.com/exportservice/v1/rest/22791753C32335607.csv?ticket=BC4B91472561713FD43BA766542E9240AFDD01B95B123E40B2C0375E3A68C142 This URL the command line gets is missing everything after the ampersand (& character). This indicates a problem with escaping. To get around this try replacing & with \&.

Categories : Javascript

wget on behalf of a web user
The short answer is no. The long answer is that it's probably possible, but enormously impractical for the following reasons: Server would need to spoof TCP packets, which it shouldn't be able to. All hops between server and third party would have to accept spoofed traffic, which they shouldn't. Client routers/firewalls would have to accept unsolicited TCP responses, which they won't. Establishing the TCP connection like that would require forwarding all sorts of hairy data from the client to the server, which is a highly platform and network dependent process. In order to authenticate to the third party, you'd have to send your credentials through the process, which is an awful idea. Accepting unsolicited requests in this manner would make you extremely vulnerable to denial of service

Categories : Javascript

file_get_contents (and wget) very slow
It's due to how Google parses robots. You need to spoof the User-Agent headers to pretend to be a computer. Some info on how to go about this would be here: https://duckduckgo.com/?q=php%20curl%20spoof%20user%20agent

Categories : PHP

Call GWT servlet with wget
I have tried to call GWT webapp using Apache JMeter (so I think wget will be able to do the same thing EDIT. curl instead of wget, thanks to @Chris Lercher, see his comment). Presuming that your application uses GWT-RPC to call server side you can't use JSON. First of all you need to convert JSON into GWT-RPC proprietary format. The simplest way to do it is to catch necessary request from the actual application. You can catch it using Chrome Developer Tools (open your app, turn on preserving log on network tab of developer tools, then force your app to fire request and analyse request payload). It may looks something like this: 7|0|4|http://yourapp/|024F843AF926C69027FD016F55BAC7DF|com.mycompany.RPCProductService|getProducts|1|2|3|4|0| Then you can try to call your app. This request w

Categories : Gwt

linux wget not certified?
Follow the instructions: To connect to dl.dropboxusercontent.com insecurely, use `--no-check-certificate'. Run: wget --no-check-certificate https://dl.dropboxusercontent.com/u/60455970/litecoin-0.6.3c-linux.tar.gz it worked for me just fine!

Categories : Linux

How can i use wget in order to obtain the public key?
Not with wget, but with OpenSSL, you can use the same method as in this question for LDAP (except on port 443, if you're interested in HTTPS, presumably). You can also pipe the output into the openssl x509 -pubkey to get the public key itself. Something like this should do: echo -n | openssl s_client -connect www.google.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | openssl x509 -pubkey -noout

Categories : C



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.