Results 11 to 16 of 16
-
27th May 2011, 12:39 PM #11MemberWebsite's:
EastsideHosting.com MediaONAIR.com ImgWiz.com cPadmin.net EastsidePCWorks.com HostedTalk.comCreated: test.php
PHP Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
echo '<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Welcome to:</td>
</tr>
<tr>
<td><strong>Hell</strong></td>
</tr>
</table>';
?>
</body>
</html>
PHP Code:<?php
error_reporting(-1);
$curlTarget = "http://127.0.0.1/test.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$curlTarget);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result = curl_exec ($ch);
curl_close($ch);
preg_match ("/(<strong)(.*?)(>)(.*?)(<\/strong>)/i", $result, $match);
echo $match[4];
?>
Curl: http://djdog2006.com/curl/curl.phpEastsideHosting - (Web Hosting, Proxy Hosting, Reseller Program)
MediaONAIR - (SHOUTcast Servers, ICEcast Servers, Reseller Program)
Server Administrator - (Dedicated Servers, VPS Management, One Time Services)
ImgWiz - (Free Image Hosting)
-
27th May 2011, 02:23 PM #12(╯?□?)╯︵ ┻━┻Website's:
Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.comSeriously this is like watching regex being mutilated into some evil devil child lol.
It *SHOULD* be (for the html above, to match just the contents of strong):
Code:#<strong>([^<]+)</strong>#i
As for your original post it would've been:
Code:#<td>Welcome to:</td>\s*<td>([^<]+)</td>#i
This:
Code:[\s\S]*
Code:.*
Projects:
WCDDL - The Professional DDL Script
Top Secret Project: In Development - ZOMG
ImgTrack - Never Have Dead Images Again!
-
27th May 2011, 03:35 PM #13Respected Member
Regex is some evil devil STEP child !!
-
27th May 2011, 05:24 PM #14OPMember
Thank you fore your replies guys.
The replies + my fiddling with my sources @work computer made me see that something in my system is messing with my xampp php install so I will be reinstalling from scratch on a virtual box properly.
Yet, I have a question JMZ, what does the ([^>]+) and ([^<]+) means? I have seen it over and over on other sites but I can't find a proper description for that.
-
27th May 2011, 06:50 PM #15MemberWebsite's:
EastsideHosting.com MediaONAIR.com ImgWiz.com cPadmin.net EastsidePCWorks.com HostedTalk.comThat's what I did in my example;
If I was coding this myself, I would use;
<strong id="identify" and display that in there so I know what it's actually getting.EastsideHosting - (Web Hosting, Proxy Hosting, Reseller Program)
MediaONAIR - (SHOUTcast Servers, ICEcast Servers, Reseller Program)
Server Administrator - (Dedicated Servers, VPS Management, One Time Services)
ImgWiz - (Free Image Hosting)
-
28th May 2011, 09:03 AM #16(╯?□?)╯︵ ┻━┻Website's:
Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.comProjects:
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
-
Looking for Exam Result Script
By DevilLnC in forum Web Application/Script SupportReplies: 5Last Post: 7th Feb 2014, 02:04 PM -
Need help with google search result
By .nItIsH. in forum Webmaster DiscussionReplies: 4Last Post: 4th Mar 2012, 07:54 AM -
preg_match help need!
By saninokia in forum Web Development AreaReplies: 8Last Post: 27th Nov 2011, 08:39 PM -
Why Google Result Going Down!!
By indianmoviefans.info in forum Webmaster DiscussionReplies: 13Last Post: 23rd Sep 2011, 08:00 AM -
Help with preg_match - php !
By softleaks in forum Webmaster DiscussionReplies: 5Last Post: 21st May 2011, 04:22 PM
themaCreator - create posts from...
Version 3.48 released. Open older version (or...