Exforsys

Free Training

PHP help please?

This is a discussion on PHP help please? within the PHP forums, part of the Programming Talk category; I have this (just an example):var first="www.mysite.com?id=3&q=nice+game ";and I want:var second="www.mysite.com" How can I do that ?I mean, extract only ...

Go Back   Exforsys > Programming Talk > PHP

Exforsys.com

  #1 (permalink)  
Old 01-19-2008, 11:26 AM
Junior Member
 
Join Date: Jan 2008
Posts: 1
Mainutz M is on a distinguished road
PHP help please?

I have this (just an example):var first="www.mysite.com?id=3&q=nice+game ";and I want:var second="www.mysite.com" How can I do that ?I mean, extract only the domain from that url
__________________
Powered by Yahoo! Answers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-19-2008, 11:27 AM
Junior Member
 
Join Date: Jan 2008
Posts: 1
Chase C is on a distinguished road
Ohh ok..preg_match ---EDIT---Rasmah, he wants to extract the domain from a url, not just echo them..
__________________
Powered by Yahoo! Answers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-28-2010, 05:06 AM
Junior Member
 
Join Date: Jan 2010
Posts: 2
steve.zaptech is on a distinguished road
Following code will help you.......

By using the following code you will get the domain name from the url.........

echo $_SERVER["SERVER_NAME"];
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
SQL Server 2005 Driver for PHP techguru PHP 0 10-09-2007 06:53 PM
Php Tutorials and ebooks cybot PHP 1 04-14-2007 03:01 AM
PHP Tutorial - Introduction rachelle PHP 0 06-02-2006 01:40 AM
Making the PostgreSQL and PHP Connection techguru Unix Articles and Tutorials 0 08-27-2005 12:24 AM
Required Web Defeloper - PHP hr_Joseph Experienced Job Seekers - India 0 05-26-2005 10:46 AM


All times are GMT -4. The time now is 12:53 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.