Unstoppable Domains

Freekin PHP TRIM

Spacemail by SpaceshipSpacemail by Spaceship
Watch

emadiba

VIP Member
Impact
3
hi there guys,

my head is spinning as ive been working on a new program that im sure you will all love once complete, problem is that ive been just under 36 hours with no sleep and cant think anymore.

I need to use the php trim function to remove first 4 characters


www.websitename.com

I need websitename.com only

how do i do this

thanks for the help in advance


:)

Never mind....


this works

$site = $_GET['url'];
$newurl = ltrim($site, "www.");

thanks anyway
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
•••
0
•••
0
•••
If you don't want the http, or something, or want to replace a certain string that you know would exist, do a str_replace function and replace it with ""
 
0
•••
0
•••
lol he has a very good point use substr
 
0
•••
Scott said:
But what if the domain is... ilovethewww.com :santa:
Meh give me a break, had no sleep. :p
 
0
•••
you could also look into regular expressions and seperate everything :p might be useful, if you have a whole list of links that you want to parse, and only some start with http://www.somesite.com and others with http://somesite.com
 
0
•••
hi i m raju79 i join here today it self i hope you will help me out
 
0
•••

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back