Skilled Illusionist
- Joined
- Jul 1, 2007
- Messages
- 367
- Reaction score
- 1
Yo!
Haven't been on here in a long, long time, but you guys have always been accommodating and helpful when it comes to Coder's Paradise
I'm having trouble today, and, as embarrassing as it is (it's a small joke project), I'm trying to grab the link from the HTML source of a porn site. (please don't ban me :*
Here's what I have so far (so stupid):
Ignore the file_get_contents_utf8, it's a working function. My problem is the preg_match won't pick up on what I'm looking for (I think I've typed in the search wrong, or used the wrong divider "(.*?)".
The links I want are in these suckers:
Do you guys have any feedback? Thanks in advance and sorry for NSFW post. <3
Haven't been on here in a long, long time, but you guys have always been accommodating and helpful when it comes to Coder's Paradise
I'm having trouble today, and, as embarrassing as it is (it's a small joke project), I'm trying to grab the link from the HTML source of a porn site. (please don't ban me :*
Here's what I have so far (so stupid):
PHP:
$file = file_get_contents_utf8('http://www.xnxx.com');
//preg_match("'<p class=\"review\">([^<]*)</p>'si", $file, $matches);
preg_match("'<a href=(.*?)/class=\"miniature\">'si", $file, $matches);
list(, $value) = $matches;
echo $value;
Ignore the file_get_contents_utf8, it's a working function. My problem is the preg_match won't pick up on what I'm looking for (I think I've typed in the search wrong, or used the wrong divider "(.*?)".
The links I want are in these suckers:
Code:
<a href="http://video.xnxx.com/video1352353/0/valentine_bang" class="miniature">
Do you guys have any feedback? Thanks in advance and sorry for NSFW post. <3