![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jun 2002
Location: france
Posts: 996
|
![]() what is the function with wich i can see if a string is in other string?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Sep 2002
Location: Nashville, TN
Posts: 104
|
You can use substr_count() to count the number of times a given string is found within another.
http://us4.php.net/manual/en/function.substr-count.php |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Feb 2002
Location: European Union
Posts: 1,124
|
ereg(), eregi()
__________________
Make Money with true niche programs like Adult ECards - Pantyhose Fetish - Men in Pantyhose ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Nov 2003
Posts: 4,292
|
or preg_match()
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Jan 2003
Location: Nomad Land
Posts: 1,629
|
strstr($string, "string")
find the first occurance of "string" in $string ... this command is pretty useful. in your case... if (strstr($string, "UHH")) { echo "YES.. UHH is in string!" }
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Jun 2002
Location: france
Posts: 996
|
thanks for your reply
i want to make an redirect to another page if a string is in the referer page...i've tryed eregi() and strstr() and both times i get same error this is the code i used: PHP Code:
"Cannot add header information - headers already sent by (output started at /home/..............) " any ideea why i get this error? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Jan 2003
Location: Nomad Land
Posts: 1,629
|
ehm you shouldn't include any html tags there, make it like this.
edit: nevermind this, it's VBulletin adding the html tags even when outputing PHP code. PHP Code:
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: May 2003
Posts: 1,792
|
Quote:
![]()
__________________
ICQ: 282814268 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2003
Location: icq: 71462500 Skype: Jupzchris
Posts: 27,880
|
feel free to use my code
php.hahahahahahahaha%%#)I$)#.PHP! that should take care of ya cheers ![]()
__________________
[email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |