Search Results

Search found 18568 results on 743 pages for 'url shortener'.

Page 96/743 | < Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >

  • Mysql Date formats and url query

    - by jasmine
    I want to make a url query with date. I have confused a little : There is a mysql table: calDate : varchar The query : $sql="select * from calTbl"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $n = str_replace("/", "",$row['calDate']); echo '<a href="index.php?p='.$n.'">'.$n.'</a>'; } I want to see related event from query. Can I set apart month, day and year from this? Or what is the correct table design here? Thanks in advance

    Read the article

  • Trying to figure out URL dispatcher for sluggale URLs like stackoverflow

    - by TylerW
    I'm using the Tornado framework (Python). I have the sluggable URLs working. But I have 3 different entries in the URL dispatcher. I was wondering if someone could help me transform it into one line. This is what I have: (r"/post/([0-9]+)/[a-zA-Z0-9\-]+", SpotHandler), (r"/post/([0-9]+)/", SpotHandler), (r"/post/([0-9]+)", SpotHandler), I want it so that the following URLs all go to the same place. http://domain.com/post/14 http://domain.com/post/14/ http://domain.com/post/14/any-text-it-doesnt-matter-what-it-is

    Read the article

  • Get absolute (base) url in sinatra.

    - by berkes
    Right now, I do a get '/' do set :base_url, "#{request.env['rack.url_scheme']}://#{request.env['HTTP_HOST']}" # ... haml :index end to be able to use options.base_url in the HAML index.haml. But I am sure there is a far better, DRY, way of doing this. Yet I cannot see, nor find it. (I am new to Sinatra :)) Somehow, outside of get, I don't have request.env available, or so it seems. So putting it in an include did not work. How do you get your base url?

    Read the article

  • Apache Shiro, INI-Configuration, Perms per URL: How to get URL params?

    - by Marcus Schultö
    I want to use Apache Shiro[1] in my JSF-Application to perform URL-based authorization checks, configuration done in shiro.ini As I see in the Shiro-documentation[2] there is a way to use a "perms"-filter /remoting/rpc/** = authc, perms["remote:invoke"] In my scenario I want this functionality, but on entity-level[3], where the entity-Id is in the http-request # "Open settings for user with id=123": # /user/settings.xhtml?user_id=123 /user/settings.xhtml = perms["user:update:XXX"] So, how do I do this with Shiro? How to I tell the perms-filter to check for http-params? Or is this supposed to be done in my Realm-Implemenation, concrete by calling FacesContext? [1] https://shiro.apache.org [2] https://shiro.apache.org/web.html#Web-webini [3] This can be done at least programmatically: SecurityUtils.getSubject().isPermitted("printer:query:lp7200") https://shiro.apache.org/permissions.html

    Read the article

  • pyramid traversal resource url no attribute __name__

    - by Santana
    So I have: resources.py: def _add(obj, name, parent): obj.__name__ = name obj.__parent__ = parent return obj class Root(object): __parent__ = __name__ = None def __init__(self, request): super(Root, self).__init__() self.request = request self.collection = request.db.post def __getitem__(self, key): if u'profile' in key: return Profile(self.request) class Profile(dict): def __init__(self, request): super(Profile, self).__init__() self.__name__ = u'profile' self.__parent__ = Root self.collection = request.db.posts def __getitem__(self, name): post = Dummy(self.collection.find_one(dict(username=name))) return _add(post, name, self) and I'm using MongoDB and pyramid_mongodb views.py: @view_config(context = Profile, renderer = 'templates/mytemplate.pt') def test_view(request): return {} and in mytemplate.pt: <p tal:repeat='item request.context'> ${item} </p> I can echo what's in the database (I'm using mongodb), but when I provided a URL for each item using resource_url() <p tal:repeat='item request.context'> <a href='${request.resource_url(item)}'>${item}</a> </p> I got an error: 'dict' object has no attribute '__name__', can someone help me?

    Read the article

  • Show image from url in uiimageview

    - by skiria
    I try to show a image in my iphone app but it doesn't show. I connect in IB and I check to show a local image, it workd good. I also check the url from image and it is ok. I use the next code: NSURL *imageURL = [NSURL URLWithString: aVideo.urlThumbnail]; NSData *imageData = [NSData dataWithContentsOfURL:imageURL]; UIImage *image = [UIImage imageWithData:imageData]; imageView.image = image; and //Video.h NSString *urlThumbnail; and this is my code on the view. - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [tableView reloadData]; } - (void)viewDidLoad { [super viewDidLoad]; NSURL *imageURL = [NSURL URLWithString: aVideo.urlThumbnail]; NSData *imageData = [NSData dataWithContentsOfURL:imageURL]; UIImage *image = [UIImage imageWithData:imageData]; imageView.image = image; }

    Read the article

  • deny direct access to a php file by typing the link in the url

    - by aeonsleo
    hi, I am using php session for a basic login without encryption for my site. I want to prevent a user from directly accessing a php page by typing the url when he/she is not signed in. But this is not happening. I am using session_start(), initializing session variables and aslo unsetting and destroying sesssion during logout. Also if I type the link in a different browser the page is getting displayed. I am not very well versed with php , only a beginner. I googled for such problem and found few alternatives as keeping all files in a seperate folder from the web root, using .htaccess etc. Can someone explain in simple terms what could be a good solution.thanks in advance.

    Read the article

  • Form string data url encoded by some browsers .net

    - by nLL
    Hi, i came accross with a peculiar issue on my mobile site. some phones/gateways sends form post data as url encoded and a text such as "hey how are you?" in a form with method post stored in the db as "hey+how+are+you%3f" This is not the issue with many browsers but one single network from USA called Metro. I notice different phone models acting same way so i assue this is an issue with proxy/gateway. would simply putting _msg = HttpUtility.UrlDecode(_msg); solve my problem? any other suggestions? Thanks

    Read the article

  • PHP: URL detection (regexp) includes line breaks

    - by marco92w
    I want to have a function which gets a text as the input and gives back the text with URLs made to HTML links as the output. My draft is as follows: function autoLink($text) { return preg_replace('/https?:\/\/[\S]+/i', '<a href="\0">\0</a>', $text); } But this doesn't work properly. For the input text which contains ... http://www.google.de/ ... I get the following output: <a href="http://www.google.de/<br">http://www.google.de/<br</a> /> Why does it include the line breaks? How could I limit it to the real URL? Thanks in advance!

    Read the article

  • [iPhone app] Inserting special char un NSString for URL use

    - by Dough
    Hi, I'm using HTTP connection to share data with my JSON server. I use URLs like "MyServlet?param1=value1" and so on... I'm now facing a problem with one of my servlet (I can't change it because some other views are using it) : The servlet is working with a syntax including those symbols "{" and "}". The exact syntax is {(value1_value2)(value3_value4)(value5_value6)}{(value7_value8)(value9_value10)(value11_value12)}{(value13_value14)(value15_value16)(value17_value18)} Values are integers, the problem is only when I use "{" and "}" my UrlConnection returns an error for bad URL. I use this to instantiate my NSString : NSString *myURL = [NSString stringWithFormat:@"http://somesite.com/Servlet?PARAM={(%@)}"]; How can I code those char in my NSString ? Thanks in advance !

    Read the article

  • Redirect based on referer's url

    - by steve
    I am trying to redirect visitors to a site based on their referring url. Here is the script: php $domain='blankds.com'; $referrer=$_SERVER['HTTP_REFERER']; echo $referrer; if (preg_match("/$domain/",$referrer)) { header('Location: http://www.blackisgreen.org/page_1.php'); } else { header('Location: http://www.blackisgreen.org/page_2.php'); }; Errors: I get a "Warning: cannot modify header" error because I am echoing $referrer before sending headers. If I remove the echo the script does not work. Any suggestions?

    Read the article

  • mvc action name in url

    - by Paul
    UPDATE: My model going into the save method is PartialViewModel, which in the save method, is pushed into the index's ContactViewModel and sent back. This wasn't clear. I am playing around with MVC3, and have a contact controller with a SaveDetails action. The index cshtml has a partial with a form whose action is pointing to this controller. When I submit the form not having completed it fully, thereby firing the validation, the url now contains the SaveDetails action name (http://localhost:7401/Contact/SaveDetails). The form code is: @using (Html.BeginForm("SaveDetails", "Contact")) { ... } The controller action looks like this: public ActionResult SaveDetails(Models.PartialsViewModel pvm) { return View("Index", new ContactViewModel{ PartialsViewModel = pvm } ); } What am I doing wrong?

    Read the article

  • what is the best practices around links and url in asp.net-mvc

    - by ooo
    looking at different sites, i see conflicting conventions. if you want to have links to images, other pages, js files, i have seen: URL.Content("~/scripts/myscript.js"); <a href="/scripts/msscripts.js"> <img src="../../content/stylesheet.css"> <img src="../content/stylesheet.css"> these all seem to work in asp.net mvc but it seems like there are all doing slightly different things. I am moving to a new webserver where they are changing from iis redirecting to isapi rewriting and i was told to make sure my links were done in a correct way or the site not work. Can someone clarify what the "correct" way is ?

    Read the article

  • Backbone.js - Getting JSON back from url

    - by Brian
    While trying to learn Backbone.js, I've been trying to grab the content of a JSON file using the following code: (function($){ var MyModel = Backbone.Model.extend(); var MyCollection = Backbone.Collection.extend({ model : MyModel, url: '/backbone/data.json', parse: function(response) { console.log(response); return response; } }); var stuff = new MyCollection; console.log(stuff.fetch()); console.log(stuff.toJSON()); })(jQuery) 'stuff.fetch()' returns the entire object (with the data I'm after in responseText), 'stuff.toJSON' returns nothing ([]), but the console in the parse method is returning exactly what I want (the json object of my data). I feel like I'm missing something obvious here, but I just can't seem to figure it out why I can't get the right data out. Could someone point me in the right direction or show me what I'm doing wrong here? Am I using a model for the wrong thing?

    Read the article

  • $.get sends prototype functions in request URL?

    - by pimvdb
    I have some prototype functions added to Object which in my opinion were practical in certain scenarios. However, I noticed that when I executed a $.get, the prototype functions are handled as data members and are sent like http://...?prototypefunc=false. This is rather useless as I don't supply these as data members, but they are added to the query string. To be exact, I have this code: Object.prototype.in = function() { for(var i=0; i<arguments.length; i++) if(arguments[i] == this) return true; return false; } $.get('http://localhost/test.php', {'test': 'foo'}, function(text) { }); The corresponding URL constructed is: http://localhost/test.php?test=foo&in=false How can I avoid this?

    Read the article

  • cancel button not working in iframe but working when using url for the page

    - by user1327358
    I am working on a form that includes a cancel button. The button correctly closes the form if it is accessed directly through a URL. But once the form is placed in an iframe, the cancel function does not work. Can you please help? Here is the code: public class Cancell extends com.ford.forms.types.Button { /** * Cancel constructor comment. */ public Cancell() { setImageName("../images/cancel.png"); setOnClickScript("if (confirm('This selection will clear your entries and close this form. Click OK to close this form.')) {document.formApp.Command.value='Cancel';window.close();}"); //setOnClickScript("window.close();"); } }

    Read the article

  • Getting rid of index.php in the URL when using recess framework and lighttpd

    - by spudnik1979
    I am using the recess php framework with lighttpd Does anyone know how I can use the shorter urls of: http://www.myserver.com/recess Instead of: http://www.myserver.com/index.php/recess The recess readme file says that if I have mod_rewrite I can use the shorter url: -- "Do you have mod_rewrite? -- Yes: Open your browser to the location you unzipped -- No: Open your browser to the location you unzipped followed by index.php" I do have mod_rewrite enabled on lighttpd and i have removed the index.php but I get a 404. Do I need any special rules in my lighttpd.conf?

    Read the article

  • Remove special chars from URL

    - by John Jones
    Hi, I have a product database and I am displaying trying to display them as clean URLs, below is example product names: PAUL MITCHELL FOAMING POMADE (150ml) American Crew Classic Gents Pomade 85g Tigi Catwalk Texturizing Pomade 50ml What I need to do is display like below in the URL structrue: www.example.com/products/paul-mitchell-foaming-gel(150ml) The problem I have is I want to do the following: Remove anything with braquets(and the braquets) Remove any numbers next to g or ml e.g. 400ml, 10g etc... I have been banging my head trying different string replaces but cant get it right, I would really appreciate some help. Cheers

    Read the article

  • wordpress path url in js script file

    - by Cam
    I added custom script wp_enqueue_script('functions', get_bloginfo('template_url') . '/js/functions.js', 'search', null, false); works great, except in the functions.js i have Reset.style.background = "url('../images/searchfield_clear.png') no-repeat top left"; now this used to work before, until changed to pretty permalinks and .htaccess the folder hierarchy is like: themename/js themename/images (the images and js folder are in themename folder) i tried ../images - ./image - /images normally it should go back 1 level where-ever the js file is located.... i dont want to use full path is there a other way that wordpress can recognize in the javascript file to have the correct path? currently i am just confused what i am doing wrong

    Read the article

  • Passing value in HTML URL link

    - by pradeep
    $.post("/diabetes/ropimages/getcount.php",{pid:$("#patient_id").val()} ,function(data1){ //alert(data1); var count = data1; var pid = $("#patient_id").val(); var rid; for( var i = 1 ; i <= count ; i++) { var link ='<img src="/diabetes/ropimages/thumbpicdisplay.php?pid=+pid+&rid=1" />'; $("#content1").empty().html(link); } }); I am trying to pass pid value in url ..but its taking directly as +pid+ as value ..how do i give it the value of pid. And how do i print 3 images in a div? like the one in code

    Read the article

  • Web service URL being overwritten with localhost

    - by Jay Heavner
    I have a reference to a web service on a remote server like such... http://10.5.1.121/PersonifyWebServicePPROD/UniversalWebService/default.wsdl The moment I invoke the web service and view its URL property it looks like... http://localhost/PersonifyWebServicePPROD/UniversalWebService/default.asmx Can anyone tell me why it's overwriting the remote server with localhost? The vendor that provided the web service said I have to reference the wsdl and not the asmx in order for it to work. I've tried running it both within IIS and as a web app on the filesystem and neither scenario work. This is on the .Net 3.5 framework.

    Read the article

  • arg function not using URL alias

    - by cinqoTimo
    I am running Drupal 6, and I'm using PHP for block visibility. <?php $city = arg(0); $page = arg(1); if ($city == 'tampa' && $page != 'art'){ return 'TRUE'; } else{ return FALSE; } ?> I was having trouble with this block of code, so I decided to insert: <?php print arg(0).arg(1); ?> in my page.tpl.php. What I found was that on some of my pages, arg(0) was showing 'node' when the URL is actually 'tampa', and of course, arg(1) is showing the node ID. However, on other pages, such as my calendar, arg(0) is actually showing 'tampa' instead of 'node'. I have used this a lot in the past, and have never had this problem. Is there a reason why Drupal is disregarding my aliases on certain pages? If so, how can I fix it?

    Read the article

  • passing javascript value in html url link

    - by pradeep
    $.post("/diabetes/ropimages/getcount.php",{pid:$("#patient_id").val()} ,function(data1){ //alert(data1); var count = data1; var pid = $("#patient_id").val(); var rid; for( var i = 1 ; i <= count ; i++) { var link ='<img src="/diabetes/ropimages/thumbpicdisplay.php?pid=+pid+&rid=1" />'; $("#content1").empty().html(link); } }); i am trying to pass pid value in url ..but its taking directly as +pid+ as value ..how do i give it the value of pid. and how do i print 3 images in a div ? like the one in code

    Read the article

  • IE sending through multiple unrequested requests for parent URL

    - by andyjeffries
    We have a rather large/complex web site (so it's not easy to extract portions of it). The problem we're having is that IE6/7/8 (but 6 is the worst) are sending through multiple requests for the parent of a URL (which fails, a different point). As an example, if you visited (dummy domain name obviously): http://www.example.com/view/event/123/456/78 We'd get 8-20 requests for: http://www.example.com/view/event/123/456/ appear in the Apache log. We've tried: Disabling all plugins (including toolbars, Flash, etc) Disabling scripting (e.g. Javascript) And it still sends through at least one erroneous request. We've viewed the requests through ieHttpHeaders so the browser is aware of them (i.e. it's not prefetching by the network's proxy). Any ideas? What can else could cause this?

    Read the article

  • How can i use clean url only i a subfolder of my website

    - by tibin mathew
    Hi, I have a web site http://www.mydomain.com Here i have created a sub folder http://www.mydomain.com/products. I want to change all the page inside the product folder as clean url. I know htaccess should be inside product folder. If it's enabled, will it affect all the parent directories and files of my site i mean http://www.mydomain.com/ here, will it affect the pages here also. i have one more doubt about .htaccess file, is there a way i can enable mod_rewrite through any code code without directly editing httpd.conf file please help me Thasnks

    Read the article

< Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >