How can i create a vanity url in codeigniter. Im having real trouble doing this in the framework. And there doesnt seem to be any good answers out there.
I'm using launching firefox from the command line in a script to get snapshots of pages. These pages have basic http authentication. When using:
firefox http://user:[email protected]
Either a dialog appears, or authentication doesn't work at all.
Is there any option to make firefox open the page without showing the dialog?
I have a big problem. I want get information with an webservice in one URL.
But I'mm getting this error:
XMLHttpRequest cannot load ht*p://external_url_that_i_trid_to_get.
Origin ht*p://localhost:8888 is not allowed by Access-Control-Allow-Origin.
Im using this:
$.get(url_parsed,date_get,function(data) {
if (data.result == 'sucess') {
alert(data.data["title"]);
}
},"json");
How I can resolve this? Regards
I'm making an ajax site. How would I go about executing some javascript every time the url changes. Say when "/#page/aboutus/" changes to "/#page/news/".
I want users to be able to bookmark ajax-pages.
I'm retrieving an unformatted String from a twitter feed. I want to be able to turn a text URL (http://blah.com/qwerty/) into a link but don't know how...is there a handy regular expression for this?
rewriteCond %{REQUEST_URI} ^(ajax|css|functions|image_viewer|images|img|include|fancybox|jquery|jscript|json)$ - [L]
RewriteRule ^(.[^/])/(.[^/])/(.+[^/]) ?program=$1&usertype=$2&username=$3 [NC]
could you please help me find what is wrong in this.. ? I need to exclude some folders from url rewriting.
i tried with the solution given here.. but still i am getting some errors..
http://www.idxsync.com/sbaor/Search/Agent/zz
please help me
I have an XML feed that looks something like this (excerpt):
<channel>
<title>Channel Name</title>
<link>Link to the channel</link>
<item>
<title>Heading 1</title>
<link>http://www.somelink.com?id=100</link>
<description><![CDATA[ Text here ]]></description>
<publishDate>Fri, 03 Apr 2009 10:00:00</publishDate>
<guid>http://www.somelink.com/read-story-100</guid>
<category domain="http://www.somelink.com/?category=4">Category 1</category>
</item>
<item>
<title>Heading 2</title>
<link>http://www.somelink.com?id=110</link>
<description><![CDATA[ Text here ]]></description>
<publishDate>Fri, 03 Apr 2009 11:00:00</publishDate>
<guid>http://www.somelink.com/read-story-110</guid>
<category domain="http://www.somelink.com/?category=4">Category 1</category>
</item>
<channel>
That's the rough of it. I'm using this piece of PHP (excerpt):
$xml = simple_xml_load_file($xmlFile);
$xml->xpath($pattern);
Now I want to get all ITEM-nodes (with their children) based on that pesky "domain" attribute in the category node, but no matter what I try it does-not-work.
The closest I got was "//category[@domain= 'http://www.somelink.com/?category=4']"
The expression I tried gave me this result:
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[domain] => http://www.somelink.com/?category=4
)
[0] => Category 1
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[domain] => http://www.somelink.com/?category=4
)
[0] => Category 1
The expression should contain all childrens of the two items in the example, but as you can see only the info in the category node is present, I want all the item nodes.
Any help would be highly appreciated.
Hai
I have one more doubt in apache mod_rewrite.
I want to rewrite the url
mydomain/index.php?category=1&id=1
To
mydomain/index/category/1/id/1
How I write rule in .htaccess
And what is the link that i have to give inside the a tag
Please give me a solution..
I'm looking for an image url helper for sinatra that allows me to do something similar to staticmatic's, where I can shortcut to a relative path like so...
=img "me.jpg"
Can anybody point me in the direction to where this might be online, or where I could learn how to write one, or provide an example of one they have already written
Many thanks
Tag :Android Development
Hey
i want to display a list of image form url which i will get from xml file. how can i do that plz assist me.
Any knid of help is appriciated
Hello, im developing a program who change his background image in function of the trending topics of twitter. So i have a function who return me a word (first TT on twitter), then i need another function that give me a url of an image relative to that word, like google images when you search or flickr. Do you know how to do this? or even better, do you have a php script made?
So, I have this url in a string:
http://www.domain.com/something/interesting_part/?somevars&othervars
in PHP, how I can get rid of all but "interesting_part"?
I want to change the URL that appears when you go to:
MYSUBDOMAIN.MYCOMPANY.COM/carbonated-milk/
to:
carbonated-milk.com/
I'm trying to figure out what to put in my .htaccess folder to do this and I've been reading through all kinds of doc files and through other peoples' questions on stackoverflow but can't come up with an answer for this. Do any of you have any idea?
Hello, could some one recommend a way to get page name from a url using JavaScript?
For instance if I have http://www.cnn.com/news/1234/news.html?a=1&b=2&c=3
I just need to get "news.html" string
Thanks!
Hi,
I have a page on the example.com domain which contains an IFrame, this IFrame loads an ASP.NET page (c#) from the example2.com domain.
From the code behind on the example2.com domain how can I get the URL of the master page?
Would it help if the 2 pages were on the same domain, so example.com contains an iframe with sub.example.com?
Thanks
So i want to open a URL and regex all the image urls from the page.
then i want to curl all of them and check what size they have. in the end i want to get the biggest one
Hi, is there any way to get example.com/all-requests to go to example.com/forum/all-requests but still have the browser url show the former? (iow not just a simple forward call).
Thanks!
Given a list of URLs, such as a/b/e/f, b/c/d/k/g, s/e/c/d, how to match an input URL to the one in the list, for example, an input c/d should be matched to s/e/c/d, not b/c/d/k/g
Hi,
I have the following in my .htaccess file:
RewriteCond %{QUERY_STRING} ^route\=product\/category\&path\=35\&page\=([0-9]+)$
RewriteRule ^index.php$ http://%{HTTP_HOST}/product/category/35/page_$1? [R=301,L]
It's not behaving as expected though, when I enter the URL:
http://mywebsite.com/index.php?route=product/category&path=35&page=2
It gets rewritten to:
http://mywebsite.com/product/category/35/page_
Could someone tell me what I have done wrong please?
Thanks,
eb_dev
Hi
My web hosting provider does not permit to use curl FOLLOWLOCATION option so I'm trying to
do it manually by using the header function.
My problem is that I need to keep my PHP script running and to be able to get the redirected URL data for parsing.
How do I do that?
hello all
When i am trying to get query string value from URL using JQuery, It replace space to %20 for each 1 space.If there are 3space then my query string value contain %20 3times.
i want to replace these %20 back with space using Jquery, so that i can use these query string value.
How can i do this.
So, I'm using URL routing with WebForms. I run locally through the Visual Studio web server, and everything is hunky-dory. I deploy locally to IIS (XP, so it's IIS5), and therefore I need to make sure that I have my app wildcard mapped so the URL routing is handled properly.
However, doing this makes all my PageMethods fail with this message:
The HTTP verb POST used to access path is not allowed
Something like /default.aspx/SendMessage does not work. I've seen solutions that exclude .svx and .asmx files, however, since this is a page method, this is a .aspx file. I know the solution is to move these files outside of .aspx, however, I have quite a few functions throughout the site in these various files. I guess I could create a single web service, and have all the functions there, however, I'm curious if there's a quick and easy way to fix this?
Thanks all,
-Steve