Freekin PHP TRIM

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
Close
0
Close
0
Close
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
Close
0
Close
lol he has a very good point use substr
 
0
Close
Scott said:
But what if the domain is... ilovethewww.com :santa:
Meh give me a break, had no sleep. :p
 
0
Close
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
Close
hi i m raju79 i join here today it self i hope you will help me out
 
0
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back