Hello, I have been searching around the net looking for solutions to my problem, but none have worked. My issue is that when i redirect using: <meta http-equiv="Refresh" content="0; url=<?php echo $URL; ?>"> The hash tag part of URL gets removed by IE. So example.com/sample#foo will just load as example.com/sample. This happens in all version of IE and appears to be a bug, but the question is how do I get around this issue? Here is the redirect page template for wordpress that I am using: <?php /* Template Name: Redirect */ ?> <?php if (have_posts()) : the_post(); ?> <?php …

Member Avatar
Member Avatar
+0 forum 5

How to take part of url and store it into a variable? For example: /home/pages/id --> I want to take id out and store it into $id. How to do that?

Member Avatar
Member Avatar
+0 forum 6

A short example of Pygame showing an image with a known internet url.

Member Avatar
Member Avatar
+0 forum 1

My code is: var customIcons = { restaurant: { icon: 'http://labs.google.com/ridefinder/images/mm_20_blue.png' }, bar: { icon: 'http://labs.google.com/ridefinder/images/mm_20_red.png' } }; function load() { var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(37.4805016667, 126.952741667), zoom: 12, mapTypeId: 'roadmap' }); var infoWindow = new google.maps.InfoWindow; // Change this depending on the name of your PHP file downloadUrl("**mark_info4.xml**", function(data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("time"); var address = markers[i].getAttribute("sectionspray"); var type = markers[i].getAttribute("pdistance"); var td = markers[i].getAttribute("totaldistance"); var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("latitude")), parseFloat(markers[i].getAttribute("longitude"))); var html = "<b>" …

Member Avatar
Member Avatar
+0 forum 1

Hello, how to write url alias in nginx ? I have create the url alias before in apache. But, now the web is moved to nginx. This is the url alias config (using .htaccess) that I have write in apache : RewriteEngine On # Turn on the rewriting engine RewriteBase /revive RewriteRule ^gambar/(.*)/(.*)$ www/delivery/avw.php?zoneid=$1&cb=INSERT_RANDOM_NUMBER_HERE&n=$2 I have try to write the config for the latest line in nginx using this codes, but it is failed : server { ... rewrite ^gambar/(.*)/(.*)$ www/delivery/avw.php?zoneid=$1&cb=INSERT_RANDOM_NUMBER_HERE&n=$2 last; ... } Please tell me how create url alias in nginx Thank you

Member Avatar
Member Avatar
+0 forum 1

http://www.xyz.com/detail.php?course=InDesign_CC i want url http://www.xyz.com/detail/InDesign_CC using htaccess ......help me i try a lot but not get success.

Member Avatar
Member Avatar
+0 forum 1

Hi there, I have a file with unicode characters I used url decoder code below on a large file, but what is funny is that it doesn't decode some lines,but when I use the code on a file with just that line it decodes it correctly. import urllib.parse for lines in open('mytxt1.txt'): s = urllib.parse.unquote(lines,encoding='latin-1') with open ('outtxt1.txt','a') as f1: f1.write(s) f1.close() for example *login=bob%40%3CSCRipt%3Ealert%28Paros%29%3C%2FscrIPT%3E.parosproxy.org* is not decoded, but when using just one line i get *login=bob@<SCRipt>alert(Paros)</scrIPT>.parosproxy.org*

Member Avatar
Member Avatar
+0 forum 4

Hello. This is my code: from bs4 import BeautifulSoup import urllib2 url = urllib2.urlopen('http://www.website_address.com') soup = BeautifulSoup(url) images = soup.find_all('img') Now how can I get the "src" of img tags?

Member Avatar
Member Avatar
+0 forum 2

my json decode script throwing error i.e. Error : DATA FETCH My code: <?php $api_url = '{"msg":"SUCCESS","msg_text":"DATA FETCH","data":[{"sn":1,"mob_no":"9602858989","date":"06-May-2015","time":"12:02:33 PM"},{"sn":2,"mob_no":"7795055128","date":"06-May-2015","time":"12:29:44 PM"}]}'; $output = file_get_contents($api_url); if($output=="") { echo "No output received"; } else { $arr_output = json_decode($output, true); if(isset($arr_output['msg'])) { $msg = $arr_output['msg']; $msg_text = $arr_output['msg_text']; if($msg == "success") { if(isset($arr_output['data'])) { $arr_data = $arr_output['data']; // above array will contain your data print_r($arr_data); } else { echo "Json data not set !!"; } } else { echo "Error : ".$msg_text; } } else { echo "Output not set !!"; } } ?>

Member Avatar
Member Avatar
+0 forum 2

Sometimes it's easier to pick an image from the internet to display in your Python Tkinter GUI toolit program.

Member Avatar
Member Avatar
+1 forum 1

Hello. I was looking for a tutorial or any example of creating web crawler that i found this code somewhere and copied and pasted to test it: First, it is a web crawler, right? Because when i gave it a url of a website, the output was some linkes were published on the terminal. Second, if you test it yourself, you will see that linkes will divided into some parts with the title `Scanning depth 1 web` and so on (the number will change). What is that for? What does it mean? What does depth number web means? Third, i …

Member Avatar
Member Avatar
+0 forum 5

Hello my friends. Look at this please: >>> from bs4 import BeautifulSoup >>> import urllib2 >>> url = urllib2.urlopen('https://duckduckgo.com/?q=3D&t=canonical&ia=meanings') >>> soup = BeautifulSoup(url) >>> links = soup('a') >>> print links [<a class="header__logo-wrap" href="/?t=canonical" tabindex="-1"><span class="header__logo">DuckDuckGo</span></a>, <a class="search__dropdown" href="javascript:;" id="search_dropdown" tabindex="4"></a>, <a href="https://duckduckgo.com/html/?q=3D">here</a>] >>> I used this `https://duckduckgo.com/?q=3D&t=canonical&ia=meanings` as the url, i thought the code above shoud do like this: Find all the links in that page of the internet, but you can see the result! As there are many links to different websites on that url page, so why it didn't print the url of each website into output?!

Member Avatar
Member Avatar
+0 forum 2

Hello! How can ask my scipt to print **every word** in a url page that starts with the letter "A" in this case? This is my code: from bs4 import BeautifulSoup import urllib2 url = 'http://www.thefamouspeople.com/singers.php' html = urllib2.urlopen(url).read() soup = BeautifulSoup(html) for word in soup.text: if soup.text.startswith('A'): print soup.text But it doesn't print anything for output.

Member Avatar
Member Avatar
+0 forum 10

Well, me again! Have an other problem with creating an other table. I want to create a Posts table with this code: <?php $servername = "localhost"; $dbname = "mydbname"; $dbusername = "mydbusername"; $dbpassword = "mydbpassword"; try { $conn = new PDO("mysql:host=$servername;dbname=$dbname", $dbusername, $dbpassword); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = 'CREATE TABLE Posts( ID INT(128) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Title CHAR(100), Author CHAR(100), Content CHAR(100), )'; $conn->exec($sql); echo "Table Posts created successfully.<br>"; } catch(PDOException $e) { echo $sql . "<br>" . $e->getMessage(); } $conn = null; ?> But when i type the url of that file in the browser, this error appear on …

Member Avatar
Member Avatar
+0 forum 3

Hello. This is my CMS login page; login.php: <?php $servername = "localhost"; $dbname = "mydbname"; $dbusername = "mydbusername"; $dbpassword = "mydbpassword"; try { $conn = new PDO("mysql:host=$servername;dbname=$dbname", $dbusername, $dbpassword); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $username = $_POST['username']; $password = $_POST['password']; $password = md5($password); $sql = "SELECT * FROM Users WHERE Username = '$username"; $result = $conn->query($sql); if $password == $result { header("Location: admin-area.php"); } $conn->exec($sql); } catch(PDOException $e) { echo $sql . "<br>" . $e->getMessage(); } $conn = null; ?> <html> <head> <title>Login Page</title> </head> <body> <form action="admin-area.php" method="post"> Username: <input type="text" name="username"><br> Password : <input type="text" name="password"><br> <input type="submit" value="submit"> </form> </body> …

Member Avatar
Member Avatar
+0 forum 18

Hi. How i can ask my crawler to print only the text of all <li></li> tags in a url page? I want to save the text of all <li></li> tags in a text file (without` <li></li>` words.)

Member Avatar
Member Avatar
+0 forum 8

Hi everybody. What is the usage of `urljoin`? An example: >>> from urlparse import urljoin >>> url = urljoin('http://python.org/','about.html') >>> url 'http://python.org/about.html' I think the answer is that when we take a link from here `'http://www.python.org/` for example , it looks like this `<a href="/about/>about</a>`. So if i take the href part which is `/about/` here and use `urljoin` to join this string (of course with `.html`) to the main url which is `'http://python.org/'` here. Correct?! Of course i should delete those `/` and `/` from `/about/` first.

Member Avatar
Member Avatar
+0 forum 3

Hello. I want to learn python urllib. I have installed it and now looking for a good tutorial, any suggestion?

Member Avatar
Member Avatar
+0 forum 4

Dajia hao, daniwebians! Just a quick question, is it possible to focus on a textbox on an externally loaded website? My goal is to load an external website, focus on a textfield, auto fill it with the current date, then submit it to then run my newly created scraper tool on the resulting page. Any ideas? I've done a bit of research and will continue to do so...

Member Avatar
Member Avatar
+0 forum 9

Dear All, (first of all I am a beginner!!!) I have a project single-page web application (php, mysql, jquery, angularjs). I have questiong regarding angularjs and php how to pass url parameter to php variable? public_profile.php?user_id=7 I know basics of angularjs routing, and it works fine. The problem is when I click on one table row, I should be taken to some kind of edit page... but I get the error saying Notice: Undefined index: user_id in C:\xampp\htdocs\hrmodel\public\pages\onclick-dummy.php on line 2 Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\hrmodel\public\pages\onclick-dummy.php on line 11 can you please help …

Member Avatar
+0 forum 0

Hello, I'm working on a small project to acquire information from regulations.gov using their API. It's fairly simple (codewise) what I'm trying to do. However, I get stuck with a "HTTP error 403: Forbidden". It means I'm connecting, but something seems to be the matter. I've been in contact with the people working on the API. They said that my API and Accept header call are fine. I don't know what the problem is. Here is the code: import urllib2 from json import load url = 'http://api.data.gov:80/regulations/v3/documents.json?api_key=API_KEY' request = Request(url, headers={"Accept":"application/json;charset=UTF-8"}) response = urlopen(request) json_obj = load(response) In essence, the …

Member Avatar
Member Avatar
+0 forum 5

Hi folks, I have a situation that's most easily explained via example, I think. So here goes. Let's say I have the following URLs: 1. /page.asp?id=123 2. /page.asp?id=123&category=ABC 3. /page.asp?id=123&category=ABC&var3=X&var4=Y I need these pages redirected. Currently links 1, and 2 redirect correctly. Option 3 though can have an arbitrary number of other parameters with arbitrary values. What I need to do is, for page.asp, ignore all parameters aside from id and category. Is there a way to do this with rewrite rules? If not, would it be possible to do if I did have the names of the other parameters? …

Member Avatar
Member Avatar
+0 forum 5

I have website project .user can log in to use it at the home page now the problem is if any user write URL for any other page without login it will show him the page I need to ensure that any user visit other page have already logged in AT THE HOME PAGE I USED JSP MYSQL JS CSS HTML

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I have this weird .htaccess rule that is used for a dropdown search engine RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+) index.php?bla1=$1&bla2=$2... and so on [L] If I want to maintain the above rule, it is allright. The problem is that I want to creat a new rule with 3 variables, but the above rule is overwriting everything and it does not let me, what should I do? If I rewrite the above rule, I will loose some important SEO ranking points. Thanks in advance, Szabi Zsoldos

Member Avatar
Member Avatar
+0 forum 2

Hello, I have a php page (category.php) that loads its content from the database when a link is clicked from another page. For example a a link that looks like this `<a href = "category.php?category=cars">Cars</a>` when clicked will pull all the items from the database under the cars category and display on the category.php page. However If a user decides to manually type in the url bar say `www.sales.com/category.php`, No content will be displayed because the `?category=something` part is missing. Please how does one go around this.? I would like to know if there are certain ways to handle this …

Member Avatar
Member Avatar
+0 forum 3

I'm trying to create an ASP .NET MVC WebSite that allows the user to enter the website without providing any additional information or by specifying an id or a name. Is this possible? How? I've tried the following method but it's not working public void Index() { //... ProcessClient(); } public void Index(int id) { //... ProcessClient(); } public void Index(String guid) { //... ProcessClient(); } public ActionResult ProcessClient() { return View("Index"); } My thanks in advanced

Member Avatar
Member Avatar
+0 forum 1

The Pyside GUI toolkit (public PyQt) lets you bring up an interactive web page with its QWebView widget. Here is a simple example.

Member Avatar
+2 forum 0

I just want to have a link forwader in Wordpress. Is there any plugin for it. I search but only find the url redirection for 301 and other navigation errors. What i want that on any link in my website there should be a link forwader like have in facebook, twitter. Is it possible to have one with plugin?

Member Avatar
Member Avatar
+0 forum 1

About a month ago our developer changed the URL for all the programmed pages; before they were all **/x_y/**somepage.aspx?a=1&b=2&z=7&h= for example and that was changed to **/y/**somepage.aspx?foo=bar&b= (the relevant part being the first section in bold). However all the pages are still accessible via /x_y/... (which is the actual name of the directory on the server). Therefore, we have a duplicate URL problem there for all pages. In Google Analytics we're seeing both versions of any given page. So how to clean this up? Would specifying a canonical URL (link rel="canonical" tag in head) do the trick? Is there any …

Member Avatar
Member Avatar
+0 forum 3

Hello, I am using Yii framwork. What I want to do is, I have a dropdown and one button. on button click, i want to send selected value of dropdown in url. <div class='box'> Change to another Skill Type<br> // IT IS DROPDOWN WITH VALUES AND ID of this input ype is 'change_skill_type_name' <?php $form=$this->beginWidget('CActiveForm', array( 'htmlOptions'=>array( ), )); $selectedOptions= CHtml::listData(SkillType::model()->findAll(array('order' => 'skill_type')),'skill_type','skill_type'); echo $form->dropDownList(SkillType::model(),'skill_type',$selectedOptions, $htmlOptions=array('id'=>'change_skill_type_name','style'=>"width: 180px") ); $this->endWidget(); ?> </div> <!-- IN BELOW, I WANT VALUE OF b as VALUE FROM ABOVE DROPDOWN--> <a href='index.php?r=Manager_team/EditSkill&sk=<?php echo $skills_id;?>&b='> <? echo CHtml::button('Change', array('id'=>'change','confirm' => 'Change skill type?','onclick'=>'')); ?> </a> </div> what …

Member Avatar
+0 forum 0

The End.