Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-11-2003, 11:34 PM   #1
JDog
Confirmed User
 
Join Date: Feb 2003
Location: Canby, OR
Posts: 7,453
php question

i'm a php programmer, just never really messed with regular expressions. now i'm running into a problem I'm trying to creat a regular expression that will read a line of text from a file and if it has href=someurl. But nothing is working. here is what I hvae so far.
PHP Code:
preg_match("/href='(.*)'/"$testing$testing2); 
but doesn't seem to work if the $testing variable has:
PHP Code:
$testing "<a href=james.com>" 
Thanks in advance for any help

jDoG
__________________
NSCash now powering ReelProfits.com
ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
NOW OFFERING OVER 60 SITES
CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)
JDog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-11-2003, 11:38 PM   #2
com
Confirmed User
 
Join Date: Aug 2003
Location: Portland, Oregon
Posts: 4,541
Go to google and lookup the Tao of Regular Expressions, or go buy Mastering Regular Expressions... or steal it.
__________________

Real. Professional. Hosting.
.:Expect Nothing Less:.
320-078-843 :: www.realprohosting.com :: [email protected]
com is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-11-2003, 11:38 PM   #3
jwerd
Confirmed User
 
Industry Role:
Join Date: Jun 2003
Location: Costa Rica
Posts: 1,953
Well, I'd do this a little differently:

<?php
//Something.txt will contain something needed in the search//

$fp = @fopen("something.txt", "r");
while($buffer = fread($fp, 1024))
{
if(strstr($buffer, "something"))
{
echo " I found something, $buffer! ";
} else {
die()
}

again, I am kind of tired so I am not sure if this will work because I haven't tested it - have no way of testing it - and again, I am sleepy... but if that is something that will help you, USE IT!

Peace
__________________
Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com
jwerd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-11-2003, 11:40 PM   #4
Jimbo
Confirmed User
 
Industry Role:
Join Date: Oct 2001
Location: Montreal
Posts: 3,989
"/href=[\"' ]?([^\"' >]+)[\"' ]?[^>]*>/i"

try this
__________________
free sex videos
Jimbo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2003, 12:09 AM   #5
JDog
Confirmed User
 
Join Date: Feb 2003
Location: Canby, OR
Posts: 7,453
Quote:
Originally posted by Jimbo
"/href=[\"' ]?([^\"' >]+)[\"' ]?[^>]*>/i"

try this
thanx man!
worked fucking great!

jDoG
__________________
NSCash now powering ReelProfits.com
ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
NOW OFFERING OVER 60 SITES
CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)
JDog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.