Results 1 to 8 of 8
-
22nd Nov 2011, 09:48 PM #1OPBannedWebsite's:
Seecure.me[PHP] Grab all img links from html/webpage
/*
For ibby
*/
PHP Code:<?
$request_url ='http://www.besthostingforums.com/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url); // The url to get links from
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // We want to get the respone
$result = curl_exec($ch);
$regex='|<img.*?src="(.*?)"|';
preg_match_all($regex,$result,$parts);
$links=$parts[1];
foreach($links as $link){
echo $link."<br>";
}
curl_close($ch);
?>
_Vick Reviewed by _Vick on . [PHP] Grab all img links from html/webpage /* For ibby */ <? $request_url ='http://www.besthostingforums.com/'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); // The url to get links from curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // We want to get the respone Rating: 5
-
22nd Nov 2011, 09:56 PM #2MemberWebsite's:
vaporhostn.comsmall quick fix for better use...
Call a website from url & hotlinks all files for right click save as...
Code:<?php if ($_GET['url']){ $request_url = $_GET['url'](); } else { echo "No url has been entered"; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); // The url to get links from curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // We want to get the respone $result = curl_exec($ch); $regex='|<img.*?src="(.*?)"|'; preg_match_all($regex,$result,$parts); $links=$parts[1]; foreach($links as $link){ echo "<a href='$link'>$link</a><br>"; } curl_close($ch); ?>
-
22nd Nov 2011, 09:59 PM #3MemberWebsite's:
csoffensive.com fagbag.me
-
23rd Nov 2011, 01:20 AM #4MemberWebsite's:
Nerdy-Tutorials.com Mp3viddown.com Filmlab.euTHANKS!
Added the [img] tag
PHP Code:<?
$request_url ='http://www.besthostingforums.com/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url); // The url to get links from
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // We want to get the respone
$result = curl_exec($ch);
$regex='|<img.*?src="(.*?)"|';
preg_match_all($regex,$result,$parts);
$links=$parts[1];
foreach($links as $link){
echo "[IMG]" . $link . "[/IMG]</br>";
}
curl_close($ch);
?>
dont know how to work urs...Convert Youtube to MP3 + Download!! mp3viddown.com
-
23rd Nov 2011, 07:30 AM #5MemberWebsite's:
vaporhostn.com
-
23rd Nov 2011, 12:11 PM #6Respected MemberWebsite's:
DL4Everything.com Soft2050.inTheres a bug in the image only which you posted
Make it check for actual url. If url doesn't exist and url starts with "/" then add base url of the website. If url doesn't contains "/" and also doesn't starts with "http://" then add the base link + actual path of the page you are grabbing
-
23rd Nov 2011, 12:12 PM #7MemberWebsite's:
Elite.SO Defendos.com Motionite.comWhat's the use of this?
-
23rd Nov 2011, 02:19 PM #8(╯?□?)╯︵ ┻━┻Website's:
Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.comyay, regex!
i prefer to not use "." (any character)
Code:#<img[^>]?src="([^"]+)"#
Projects:
WCDDL - The Professional DDL Script
Top Secret Project: In Development - ZOMG
ImgTrack - Never Have Dead Images Again!
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
detect updates on a webpage and extract the file hoster links.
By Mitt281 in forum Web Application/Script SupportReplies: 0Last Post: 6th Nov 2012, 09:26 PM -
Webpage Image Links Finder
By Bright in forum Web Development AreaReplies: 12Last Post: 20th Feb 2012, 02:45 AM -
Hiding Your HTML Webpage Sourcecode from noobs
By soft2050 in forum Tutorials and GuidesReplies: 17Last Post: 13th Jun 2011, 06:09 PM -
Is there a way to just grab the File name only off FS Links?
By The90sKid in forum Technical Help Desk SupportReplies: 6Last Post: 1st Jan 2011, 10:23 AM -
CSS/HTML Help - Auto-size webpage to fit any screen?
By iL < in forum Technical Help Desk SupportReplies: 0Last Post: 17th Nov 2009, 04:10 AM
themaCreator - create posts from...
Version 3.23 released. Open older version (or...