Search Results

Search found 21350 results on 854 pages for 'url parsing'.

Page 209/854 | < Previous Page | 205 206 207 208 209 210 211 212 213 214 215 216  | Next Page >

  • How can I load scripts, styles and images from a non-URL source?

    - by Jen
    I am integrating WebKit (via Qt) into an application. Instead of having WebKit retrieve scripts, CSS files and images via URLs, I want my application to provide them (e.g. retrieved from a database). For example, a "regular" web page may contain this tag: <IMG src="photos/album1/123456.jpg"> Instead of WebKit fetching this image from a server or the file system, I would prefer some kind of callback that allows my application to provide this image. How can I accomplish this?

    Read the article

  • Can I stop Uri from unencoding a url in WebRequest.Create?

    - by Paul
    The code itself isn't complex, it's just not working properly: Uri uri = new Uri("https://www.google.com/webmasters/tools/feeds/sites/http%3A%2F%2Fwww.mydomain.co.uk%2F"); WebRequest.Create(uri); I get a "Bad Request" back from the server, and after much MUCH digging, discovered that the uri is being turned in to "https://www.google.com/webmasters/tools/feeds/sites/http%3A//www.mydomain.co.uk/" which is not what I asked for, and so it's having a whinge Is there a way to stop this?

    Read the article

  • Leaks in passing the request using URL at NSString, Objective-C.

    - by Madan Mohan
    Hi Guys, I getting the leak in this method even the allocated nsstring is released. -(BOOL)getTicket:(NSString*)userName passWord:(NSString*)aPassword isLogin:(BOOL)isLogin { login =[self getloginList]; username = login.name; password = login.password; NSString* str=@""; if (isLogin == YES) { str = @"https://accounts.=true&LOGIN_ID="; str = [str stringByAppendingString:[self _encodeString:username]]; str = [str stringByAppendingString:@"&PASSWORD="]; str = [str stringByAppendingString:[self _encodeString:password]]; } else if (isLogin == NO) { str = @"https://accounts.=true&LOGIN_ID="; str = [str stringByAppendingString:[self _encodeString:userName]]; str = [str stringByAppendingString:@"&PASSWORD="]; str = [str stringByAppendingString: [self _encodeString:aPassword]]; } NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:str] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:25.0]; [request setHTTPMethod: @"POST"]; NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];//****************** i am getting leak here showing as nsstring is leaking NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; printf("\n returnString in getticket:%s",[returnString UTF8String]); NSRange textRange; textRange =[returnString rangeOfString:@"TICKET"]; if(textRange.location != NSNotFound) { printf("\n **********************"); NSArray* splitValues = [returnString componentsSeparatedByString:@"TICKET="]; NSString* str1 = [splitValues objectAtIndex:1]; NSArray* splitValues1 = [str1 componentsSeparatedByString:@"RESULT"]; NSString* ticket1 = [splitValues1 objectAtIndex:0]; self.ticket = ticket1; self.isCorrectLogin = YES; [returnString release]; return YES; } else { self.isCorrectLogin = NO; [returnString release]; return NO; } return NO; } Please help me out of this problem.

    Read the article

  • How to get the domain name from an url with PHP?

    - by ilhan
    For example http://www.google.com/ -> google.com http://www.ma219.metu.edu.tr -> metu.edu.tr https://www.nic.tr/ -> nic.tr http://www.plasticsurgery.a.bg/ -> plasticsurgery.a.bg www.abv.bg -> abv.bg abv.bg -> abv.bg The output should not have subdomain. Edit: It would be great if we were able to read http://mxr.mozilla.org/mozilla/source/netwerk/dns/src/effective_tld_names.dat?raw=1

    Read the article

  • Best way to format a query string in an asp.net mvc url?

    - by Stuart
    I've noticed that if you sent a query string routevalue through asp.net mvc you end up with all whitespaces urlencoded into "%20". What is the best way of overriding this formatting as I would like whitespace to be converted into the "+" sign? I was thinking of perhaps using a custom Route object or a class that derives from IRouteHandler but would appreciate any advice you might have.

    Read the article

  • Never getting a JSON response when running server-side PHP proxy script but I do with others

    - by Dohk
    I'm on PHP 5.3.4 and Apache 2.2 btw So I'm using (or trying to use) Simple PHP Proxy (Simple PHP Proxy) I enter a URL at his example page at SPP Example Page and it works fine, I see the JSON response and all the headers. However, when I copy the exact URL, only changing the URL to now have localhost, I get both empty headers and no JSON. Assuming that the script on his site is the same I downloaded, could this be due to a multitude of things or a setting in Apache and/or the PHP ini? So for example: benalman.com/code/projects/php-simple-proxy/ba-simple-proxy.php?url=http://github.com/&full_headers=1&full_status=1 That will get me a ton of info back Now changing to localhost http://localhost/ba-simple-proxy.php?url=http://github.com/&full_headers=1&full_status=1 {"headers":[],"status":{"url":"https:\/\/github.com\/","content_type":"text\/html","http_code":301,"header_size":194,"request_size":182,"filetime":-1,"ssl_verify_result":0,"redirect_count":1,"total_time":0.094,"namelookup_time":0,"connect_time":0.047,"pretransfer_time":0,"size_upload":0,"size_download":185,"speed_download":1968,"speed_upload":0,"download_content_length":185,"upload_content_length":0,"starttransfer_time":0,"redirect_time":0.047,"certinfo":[]},"contents":null} I even went basic and just used some curl and of course, empty objects being returned other than false for my content and the url I set in my JSON. Any help is deeply appreciated or any ideas.

    Read the article

  • Servlets response.sendRedirect(String url) doesn't seems to send the encoding, why?

    - by Daziplqa
    Hi folks, I have some Servlet that explicity sets the character encoding and redirect to some servlet class Servlet1 extends HttpServle{ void doGet(..... ){ // ... request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"): //...... response.redirect(servlet2); } } class Servlet2 extends HttpServle{ void doGet(..... ){ // ... request.getCharacterEncoding(); // prints null ?? why??? //...... } } So, why the character encoding not being send with the request?

    Read the article

  • How do I use Asp MVC Url Helpers to generate RESTful links?

    - by Josh
    I'm trying to use Html.ActionLink to generate a link with in this form: /Action/Model/Id/Parameter1/Parameter2 I've used: <%= Html.ActionLink("Link Text", "Action", "Model", new { id = var, parament1=var1 }, null) % but it always ends up looking like /Action/Model/Id?parameter1=variable I've seen similar questions on Stackoverflow and elsewhere, but I can't find a solution that works/makes sense. Any help would be appreciated.

    Read the article

  • .htaccess not load css file and images and duplicate parent url?

    - by Mahran Elneel
    i have create htaccess and cannot load css file and images but when add ../file.css and images ../ima it work but i want to open in current directory. and when click the link in home page like will be http://localhost/mysite/program/4 but in another page will add http://localhost/mysite/program/program/2 and this wrong location the .htaccess code Options +FollowSymLinks RewriteEngine On # Turn on the rewriting engine RewriteRule ^program/([0-9]+)/?$ get_programs.php?pack_id=$1 [NC,L] RewriteRule ^El-Mensajero/?$ home.php [NC,L] RewriteRule ^Daily-Tours/?$ daily_tours.php [NC,L] RewriteRule ^page/([0-9]+)/?$ get_pages.php?page_id=$1 [NC,L]

    Read the article

  • How to replace element's attr href with each ? // strip url

    - by Barlas Apaydin
    im trying to change href with each method, here is demo, inspect a, you'll see there is no change html: <a href="#/news">News</a> <a href="#/news/detail">Detail</a> <a href="#/sport">Sport</a> <a href="#/sport/football">Football</a>???????????? jQuery: $('a').each(function() { $(this).attr('href').replace('#/',''); //tried to erase #/ from all hrefs });

    Read the article

  • best SEO method for date in url structure? [closed]

    - by Haroldo
    I'm working on an events website so dates are very important search terms, ie: 'whats on on fri 14th september' I've seen it done in various methods for example: domain/whats-on/city-hall/14-09-2010/event-name.html domain/whats-on/city-hall/2010/09/14/event-name.html the first is 'shallower'. the second could be clearer for google to synonym-ize as a date, has anyone else got any experience or input?

    Read the article

  • Javascript function working strangely during the first call in CHROME ?

    - by Sohil
    HI all, Below mentioned javascript code works fine in all browsers including chrome(from second call onwards). function call(val){ url = window.location.href; indexnum = url.lastIndexOf("/"); str = url.slice(indexnum+1); window.location.href = url.replace(str, "sample.php?src_q=") + val; } I am calling this function on onclick of a link as below <?php echo "<a href='#' onclick='javascript:call(\"$fieldvalue\");'>$fieldvalue</a>" ?> Normal Behaviour : In all browser after clicking on the link new formed url is url://localhost/mysite/sample.php?src_q=val Strange Behaviour : When I click on the link for the first time in chrome value of variable val gets replaced by url and its value as follows http://localhost/mysite/sample.php?src_q=http://localhost/mysite/val This strange behaviour happens during the first click in chrome. From the second call onwards in the same tab, the value of variable val works fine and I get desired url. I tried to google on it, but couldn't found any explanation. Thanks in advance.

    Read the article

  • AJAX/JSONP Question. Access id denied using IE while requesting corss domain.

    - by Sisir
    Ok, Here we go. I have already searched the Stack for the answer i have found some useful info but i want to clear up some more things. I also search the net for the answer but no real help. I have worked with some api (yelp, ouside.in). In yelp i use to inject the script to head with the url request to the api with a callback funcion. I worked fine in all browsers. But while using outside.in api when i call the url the callback in not working. In yelp they have a url field can be used like that callback=callbackfuncion so the callback will automatically called. But in outside.in there is not such field available. Is there are any standard command for callback function which will work regardless of any server/api? I also tried a standard ajax request using jQuery $.ajax() function. It worked for my local pc for both IE and other browser but did not working in IE showing the error: access denied, other borwser seems ok. Firebug in my FF also don't notice any errors. Outside.in has an javascript example but it is too hard to me to understand github.com/outsidein/api-examples/tree/master/javascript/browser/ site i am working: http://citystir.com yelp: yelp.com outside.in: outside.in Techniqual info: i am using: wampserver in local, wordpress for hosting, Godaddy, apache for remote with linux. Codes: Using Jquery $.ajax url is like: "http://hyperlocal-api.outside.in/v1.1/states/Illinois/cities/chicago/stories?dev_key="+key+"&sig="+signeture+"&limit=3 function makeOutsideRequest(url){ $.ajax({ url: url, dataType: 'json', type: 'GET', success: function (data, status, xhr) { if (data == null) { alert("An error occurred connecting to " + url + ". Please ensure that the server is running and configured to allow cross-origin requests."); }else{ printHomeNews(data); } }, error: function (xhr, status, error) { alert("An error occurred - check the server log for a stack trace."); } }); } Thanks!

    Read the article

  • How to get current controller for a URL in Rails?

    - by valk
    I'm using this code to highlight currently active menu tab with Twitter Bootstrap: def nav_link_to(link_text, link_path, options = nil) class_name = current_page?(link_path) ? 'active' : '' content_tag(:li, :class => class_name) do link_to link_text, link_path, options end end This of course makes the link active, only if the given link IS the current page. How can I change this function, such that it would return 'active' for any links below current controller? In other words, for all actions for Posts controller, the links would be active? Thanks.

    Read the article

  • [Facebook Graph API - Android] I want to know the HTTPSConnection redirected to which URL?

    - by Mohammad Abdelaziz
    I am building an application that uses the Facebook Graph API. To get the access token I should send the following request https://graph.facebook.com/oauth/authorize? client_id=...& redirect_uri=http://www.example.com/callback It redirects to the redirect_uri with the code to be used as access token. How can I capture that the HttpsURLConnection is redirected and how to get the code? Is it possible or I need to have server that gets the access token?

    Read the article

  • Php, passing data between pages without using the url?

    - by terabytest
    I have a php page that has a form that asks for an e-mail. When you press the send button, it gets to another php page, which gets the form data and does its stuff. I need to then be able to go back to the old page (the one that contained the form) and give it some data so that it will be able to change itself and say "You've sent your e-mail successfully, and will not display the form. How do I do it?

    Read the article

< Previous Page | 205 206 207 208 209 210 211 212 213 214 215 216  | Next Page >