PHP - How To Get And Display All The Website Links From A Website In Php?
I tried searching on google but couldn't find any relevant information, please redirect me to relevant source or help me with the code.
I want to pass a domain name in text field which will be scanned and then the script will display entire site map. Not external links or links on a page. Sorry it is not easy for me to explain. Eg. if i pass abc.com Script will display abc.com/12/adn.php abc.com/asd/asd/ etc Whatever their url format is. All the links on that domain. Similar TutorialsHI, Does anybody knows a script that extract all of a website links.I mean I enter a website url and It begins to extract all of the links that exist in that website. Thanks Is it possible to extract all links from a website (not a single webpage) by php? I am asking about the general idea, as I wish to customize: e.g. from a specified directory and certain domains only. Thanks I'm trying to crawl for links in a specific website and show them at the end. The problem i'm facing is that it only show the links from the specific page not the whole pages in the website. I tried several loops with no success please give some advise. Here is the code: <?php if (isset($_POST['Submit'])) { function getLinks($link) { /*** return array ***/ $ret = array(); /*** a new dom object ***/ $dom = new domDocument; /*** get the HTML (suppress errors) ***/ @$dom->loadHTML(file_get_contents($link)); /*** remove silly white space ***/ $dom->preserveWhiteSpace = false; /*** get the links from the HTML ***/ $links = $dom->getElementsByTagName('a'); /*** loop over the links ***/ foreach ($links as $tag) { $ret[$tag->getAttribute('href')] = $tag->childNodes->item(0)->nodeValue; } return $ret; } /*** a link to search ***/ $link = $_POST['address']; /*** get the links ***/ $urls = getLinks($link); /*** check for results ***/ if(sizeof($urls) > 0) { foreach($urls as $key=>$value) { if (preg_match('/^(http|https):\/\/([a-z0-9-]\.+)*/i',$key)) { echo '<span style="color:RED;">' . $key .' - external</span><br >'; } else { echo '<span style="color:BLUE;">' . $link . $key . ' - internal</span><br >'; } } } else { echo "No links found at $link"; } } ?> <br /><br /> <form action="" method="post" enctype="multipart/form-data" name="link"> <input name="address" type="text" value="" /> <input name="Submit" type="Submit" /> </form> Hello,
I am hoping to get some help with this. I want to apologize in advance as I am not a developer more of a systems admin guy. Okay guys, here is the deal. My boss has a website, which uses from my understanding Wordpress for design, but also uses PHP. Since, I am not too familiar with the general uses of PHP, I cannot explain why they are doing it that way. The website also uses MYSQL, which I would imagine works with PHP to gather data from some back end server.
The website has five tabs on the top right corner
about services resources contact us login
When you hover over these five tabs they expand and show more menus. The tab with the issue is the services tab. When you hover over it, it works as anticipated; it expands and shows our services. Upon getting on there, there are a bunch of services, which you can click on. When you first click, it works as anticipated. However, if you try to click on another service within that category, it simply does not load the page. Now if you decide to go into a different service it works, but once you try to click on another services within x category it just does not work.
I would really appreciate everyone's help on this. It would be nice to get this resolve.
I can provide you guys with the website and php scripts and codes if need be.
This is the website
http://beta.morrowco.com/
Thanks,
Jeff M
need help i startet to regenerate an old website but the one or other thing dont works so like that: Code: [Select] <? require("droplist.inc.php"); if (!isset($region)) $region = 0; $region_names = array("Laglamia", "Dekardi", "Dekadun", "Dekaran", "Shilon", "Searoost", "Paros", "GWH"); $region_monster_count = array(14, 12, 18, 19, 16, 26, 19, 8); ?> <head> <title>Dropliste</title> <meta http-equiv=content-type content="text/html; charset=windows-1252"> <meta http-equiv=imagetoolbar content=no> <link href="image/style.css" rel=stylesheet type="text/css"> </head> <body bgColor="#2d2d2d" link="#FFFFFF" vlink="#FFFFFF" alink="#FF9900"> <hr> <div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <? for ($idx = 0; $idx < count($region_names); $idx++) { print("<a href=\"droplist.php?region=".$idx."\">"); if ($idx == $region) printf("<font color=\"#FF9900\">"); print($region_names[$idx]); if ($idx == $region) printf("</font>"); print("</a>"); if ($idx < count($region_names) - 1) print(" | "); print("\n"); } ?> </font></div> <hr> <table cellSpacing=0 cellPadding=1 width="95%" align=center border=0> <tr><td colSpan=3 height=1><br></td></tr> <tr><td bgColor=black colSpan=3 height=1></td></tr> <tr><td bgColor=silver colSpan=3 height=1></td></tr> <tr><td colSpan=3 height=1><br></td></tr> <? for ($idx = 0; $idx < $region_monster_count[$region]; $idx++) { printf(" <tr> <td width=135 valign=top align=center> <font face=\"Arial, Helvetica, sans-serif\" size=2> <img width=130 height=140 src=\"image/droplist/".$monsters[$region][$idx][0].".gif\" border=0> </font> </td> <td width=* valign=top> <font face=\"Arial, Helvetica, sans-serif\" size=2> <b>".$monsters[$region][$idx][1]."</b> <strong>[ Level ".$monsters[$region][$idx][2]." ]</strong> <br> <font color=#ffff00>Drops:</font><br><font face=\"Arial, Helvetica, sans-serif\" size=1>".$monsters[$region][$idx][3]."</font> <br> <font color=#ffff00>Random-Drops:</font><br><font face=\"Arial, Helvetica, sans-serif\" size=1>".$monsters[$region][$idx][4]."</font> </font> </td> </tr> <tr><td colSpan=3 height=1><br></td></tr> <tr><td bgColor=black colSpan=3 height=1></td></tr> <tr><td bgColor=silver colSpan=3 height=1></td></tr> <tr><td colSpan=3 height=1><br></td></tr> "); } ?> </table> <hr> <div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <? for ($idx = 0; $idx < count($region_names); $idx++) { print("<a href=\"droplist.php?region=".$idx."\">"); if ($idx == $region) printf("<font color=\"#FF9900\">"); print($region_names[$idx]); if ($idx == $region) printf("</font>"); print("</a>"); if ($idx < count($region_names) - 1) print(" | "); print("\n"); } ?> </font></div> <hr> </body> </html> The content iss in another file the problem iss the links (you can see the page the http://psychadelics.co.de/droplist.php ) dont work if i click on it so the funktions must be have errors can annyone help me that if i click for example Dekardi that the list shows up for it? i hope annyone can help^^ It's very possible, and I've seen a website that's done it (http://www.zybez.net/radio/) - They are able to include the recent songs played on there website. The information can be obtained from right he http://68.168.100.60:7942/played.html But I'm not sure if thats where they get it from. If I login to my Admin section, there will be an option that says get XML stats. But I'm not sure if that shows the recent songs played like it would at http://68.168.100.60:7942/played.html (Everytime I refresh the page, the stats/data/info in the XML change) Code: [Select] 1250001522Rockhttp://srbuckey.listen2myradio.comMusicPEAK - RockKings of Leon - Radioactive N/AN/AN/A226153140audio/mpeg1.9.86201901701119000000004013207.144.125.60NSPlayer/11.0.6001.7006 WMFSDK/11.0026101521287587284Kings of Leon - Radioactive 1287586919Three Days Grace - Riot 1287586542Alice In Chains - Here Comes The Rooster 1287586281Green Day - Boulevard of Broken Dreams 1287586277down 1287586075Green Day - American Idiot 1287586044Metallica - Enter Sandman 1287585836ACDC Highway To Hell.mp3 1287585449Metallica - 04 The Unforgiven I.MP3 1287585448[HTTP/1.1 200 OK] http://www.ventsi.com/Music/MetallicA/1991 - Black Album/Metallica - 04 The Unforgiven I.MP3 hello, I want to display the echo ''"; in the right place on my website in changepassword_form.html all messages are written in changepassword.php. how can i move these echo after entering the wrong password or username? changepassword.php <?php ........... //success //change password in db $querychange = mysql_query("UPDATE users SET password='$newpassword' WHERE username='$username'"); session_destroy(); echo 'Password Has Been Changed Successfully !'; //move these } else{ echo('new password doesnt match!'); //move these } } else { die('old password doesnt match!'); //move these } } else { echo ""; include 'changepassword_form.html'; exit(); } } else{ echo 'you must be logged '; } ?> move these echos somewhere to my html code how to do these??
I would like to pull in Facebook reviews from my Facebook page and display them on a page on my website but am new to doing that so just seeing if there is any sample code I can get from somewhere to have a look at please? Hi
I'm looking for some advice on how to parse an xml feed and display any odds on my site
Here is an example http://feed.youwincd...in_football.xml
and as you can see it is quite large so calling it every time would have an impact on the server.
I am looking at using many different feeds in the future so want to start this properly and in a scaleable way.
I want to use php but open to any ideas on the best way to do this
Many thanks
Sam
Hi,
I've got a "data.txt" file with the following content:
One1:One2:One3:One4:One5:One6 Two1:Two2:Two3:Two4:Two5:Two6 Three1:Three2:Three3:Three4:Three5:Three6Now I want to be able to take each data and put on a specific location of a htlm code. Each line for its own. So for the first line, it should look something like this: <html> <head> <title></title> <head> <body> <h1>One2</h1> <h2>One4 some other Text One5</h2> <img src="One6.jpg"> </body> </html>Unforturtunately I don't have a clue how to do that. Can anybody help me out or does someone know a good and easy tutorial? Thanks a lot I'm trying to make a League of Legends (a video game) community website, both as a personal project and for practice. Now the game has a lot of champions, each of whom have 5 unique abilities. Now, I thought about manually inputting all the details about each champion into a MySQL database, but that would long and tedious, and I don't really have the time for it now. Also, the game patches very oftern (like, once every 2 weeks) which changes many of the stats, etc. of the champion, and it is not possible for me to keep manually updating these every time there is a patch. Fortunately, there is a League of Legends Wiki which has all the data I need in their specific champion pages, which they keep updated per patch. So I was wondering if there was any way to get the data from the divs in the wiki, and have it display on my site. What I want to do in my website is that whenever someone types a champion's name (in a post or whatever), I want it to display a hover-over dialog with some of the champions details. And a lot of other features such as that. In plain English I need a way to : > Tell PHP to go to the wiki's source code on a specific page > Find a specific div container > Get X data from there > Pass X data into a function to display the hover-over I think this way, I would not have to maintain a database as I can leech off the wiki's data. I have not coded anything like this before, so I would like a few pointers as to how to achieve this. Any help will be appreciated! I'm working with a downloaded open-source CMS on localhost, and trying to learn. Is there a tool that will list the files (php and otherwise) that are accessed (in order) as the CMS does various normal operations? I want to see the order and the repetition of files that are opened, even if it is something minor. Thanks. hello My database is in a same server with seperate domain name , then I want to insert from website1 mysql data on website2 mysql data. can anyone help me? Is it possible to download files from a website to my online websites root directory? reason I'm asking is because I have been downloading large video files to my computer which take about 20 minutes!! Then I use FTP to upload them to my site but it takes about 2-3 hours per video!! I was looking for a faster way! All help would be great! This would be an example of a page I'm referring to: http://www.curse.com...other-downloads
I want to get the file name and compare it to another name (to see if they are the same or not). I have no idea how to access that page from my website. I'm guessing PHP would be best although if you don't think so tell me what you think would be better (I was thinking javascript but don't think that's cross-site compatible). Is there a PHP function to get the value of the href which is in this case (as of this posting) "Railcraft 9.4.0.0".
I used inspect element to see the code of the page but have no idea if this is possible or if I'm even going about this the right way. The code would have to work on this entire website (all pages have the smae layout as this one though! Any help is greatly appreciated!
Hi, I haven't used any php for a while, but i am making a website, and i need some advice on how to do the following: I want the website to change an image once every 24 hours, the image will revert back to the original image after 2 minutes. Does anyone have an idea how I could start doing this? I am working on a website and I am at a standstill. I would rather speak to someone one on one but its been very difficult to find someone that could help. I have the scripts that I want but when I add the scripts to the mainpage everything stops working. I really don't want to go to wordpress because I am almost done with this one. Thanks.
My code on website is not validate on W3 Validator.
<?xml version="1.0" encoding="ISO-8859-1"?> Hello everyone and thank you for reading this.
My goal: Build a site like sportingnewschicago.com
What it does? It has different sectiions of different teams. Then it displays the tittle of the news and makes them be able to click on to go to the news site. The site some how checks a list of sites and post them on their respected section. But only ones that have not already been listed.
What i want to do? Well i want to try to learn how to do this. Is this something i can make with the help of members here? It would only have index.php and thats it.
Please let me know if anyone would be interested in teaching me as i do it. If not i would understand. Thank you.
Hi there Can anyone please help me. I am trying to get my website working but i am struggling big time with the php. The things i need to do are not to complicated however my lack of skill with php is making me struggle. I need help in making the php work on my website. Can anyone help please. (Please note it is not a commercial or business website.) Anyone who can help please contact me. Thanks |