Black Hat Forum Black Hat SEO The only backlink provider with unlimited projects/links per day!
Go Back   Black Hat Forum Black Hat SEO > BlackHatWorld > BlackHat Lounge

BlackHat Lounge What’s been on your mind lately? Maybe you've come across a website that made you laugh. Almost anything goes here!

Mad Content   BLOG SEO
Search
 
LinkWheel

LiveChatAgent



Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-26-2009, 08:36 PM
Regular Member
 
Join Date: Dec 2008
Posts: 392
Thanks: 123
Thanked 444 Times in 110 Posts
Reputation: 53
iTrader: (0)
Default how to put & in a php get command.

I didnt know where to post this but i just have a quick question.

Suppose i want to pass this data using the GET command but there is a '&' symbol in it.
example
mysite.com/get.php?data=hey&you
basically i want the data variable be equal to hey&you
The real problem i have is that the data am passing through has a lot of '&'
it might look like this

mysite.com/get.php?data=MSCulture=IP=69.237.119.242&IPCulture =en-US&PreferredCulture=en-US&Country=VVM%3D&ForcedExpiration=0&timeZone=-8&myStuffMarket=87&USRLOC=QXJlYUNvZGU9OTE2JkNpdHk9 U2FjcmFtZW50byZDb3VudHJ5Q29kZT1VUyZDb3VudHJ5TmFtZT 1Vbml0ZWQgU3RhdGVzJkRtYUNvZGU9ODYyJkxhdGl0dWRlPTM4 LjU3NjUmTG9uZ2l0dWRlPS0xMjEuNDQ0NSZQb3N0YWxDb2RlPS ZSZWdpb25OYW1lPUNB; SessionDDF2=vUTYPyF69wEVMfT8JyPOiqxlIQmWZYX1ZPuAkD phMW/8Cvg9otjeskTNLUfvVbFkMcuD4VYnQx8pFjRhcWQg1Q==; CMSCAP=CDATE=633928370001293959&633553696460632722 _ct=1&633553696460632722_exp=633954290001293959&63 3553704238913972_ct=1&633553704238913972_exp=63395 4290001293959; NSC_mc_qspgjmf-nbjo_80=447f22183660; __utma=102911388.61039420.1259269990.1259269990.12 59269990.1; __utmb=102911388.2.10.1259269990; __utmc=102911388; __utmz=102911388.1259269991.1.1.utmcsr=(direct)|ut mccn=(direct)|utmcmd=(none); LASTUSERCLICK=%7bts+'2009-11-26+12%3a34%3a12'%7d; GADC=EUD=0:0:Y2I0NzU1MjEwNTBkYTgxOKreyNsx1ptWb_Lld IyJI8nbL1rcQGY-1LgorAMgpcN7xHETqRlPGeH8ECYO89Dm0xlCenpLabjzXsJf5D kllBVO2749uvtW_5xCciMhpenX; SplashDisplayName=delicious; DERDB=ZG9tYWluPS5teXNwYWNlLmNvbSZ0bGQ9Y29tJnNtb2tl cj0tMSZzZXhwcmVmPS0xJnV0eXBlPTImcmVsaWdpb25pZD0wJn JlZ2lvbj0wJnBvc3RhbGNvZGU9Jm1hcml0YWxzdGF0dXM9UyZp bmNvbWVpZD0wJmhlaWdodD0xJmdlbmRlcj1NJmZyaWVuZHM9MC ZldGhuaWNpZD0tMSZhZ2U9MzkmYm9keXR5cGVpZD0tMSZjaGls ZHJlbmlkPS0xJmNvdW50cnk9S0gmZGF0aW5nPTAmZHJpbmtlcj 0tMSZlZHVjYXRpb25pZD0tMSZyZWxhdGlvbnNoaXBzPTAmbmdf sdfsdfluZz0wJmRpc3BsYXluYW1lPWRlbGljaW91cyZmcmllbm RpZF9pbnQ9OTExNDQ2MDgmaXBhZGRyZXNzPSc2OS4yMzcuMTE5 LjI0Micmc2NobD0wJnNjaGw9MCZzY2hsPTAmZ3JwPTAmZ3JwPT AmZ3JwPTAmY3VsdHVzZXJwcmVmPTEwMzMmbmV3dXNlcj1GYWxz ZQ==; MSSession=UNRNDMSG=-1&ATTBUFSIZE=-1&FRREQ=-1&HOMETHEMEID=-1&OPENTHEMECONTROLLER=-1&ISNEWUSER=-1&SHOWADDTOBLOGPREFERREDLIST=False&WIMSTATE=DEFAUL T%7C0%7C0%7C%7C%7C%7C0%7C%7C%23%7C%7C&WIMHOSTNAME= http%253A%252F%252Fwebim0270.webim.somesite.com&SU GGESTIONDISMISSED=False&DRAFTMSGCOUNT=-1&CONTRIBUTORID=0&LASTALBUMUPLOADED=0&WEBIMDISABLE D=False&ISPOMPOPEN=False


Thats basically a cookie, but anyways what am trying to say is that what is the way to send all that to the variable 'data' if you notice there are a lot of & that i want to send them to the data variable.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-26-2009, 08:41 PM
drey2k's Avatar
Regular Member
 
Join Date: Jan 2009
Location: USSR 1943
Posts: 492
Thanks: 145
Thanked 145 Times in 94 Posts
Reputation: 6
iTrader: (0)
Default Re: how to put & in a php get command.

Perhaps use a backslash "\" can cancel the & out?

I'm kind of a newb at PHP so this is the first thing that came to mind.
__________________
When knowledge is secured first, profits in abundance almost have to follow, and when they do, they will be real, authentic, and very lasting.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-26-2009, 08:44 PM
neta1o's Avatar
Regular Member
 
Join Date: Sep 2008
Posts: 397
Thanks: 88
Thanked 275 Times in 70 Posts
Reputation: 41
iTrader: (0)
Send a message via AIM to neta1o
Default Re: how to put & in a php get command.

You'll probably have to urlencode the data in the GET to make sure it is friendly

http://php.net/manual/en/function.urlencode.php
__________________
Follow me on twitter @neta1o
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-26-2009, 08:59 PM
Superlative Stuff(ing)
 
Join Date: Apr 2009
Posts: 302
Thanks: 202
Thanked 68 Times in 37 Posts
Reputation: 12
iTrader: (0)
Default Re: how to put & in a php get command.

I think your url violates the 255 character limit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-26-2009, 09:05 PM
Regular Member
 
Join Date: Dec 2008
Posts: 392
Thanks: 123
Thanked 444 Times in 110 Posts
Reputation: 53
iTrader: (0)
Default Re: how to put & in a php get command.

Quote:
Originally Posted by shadowpwner View Post
I think your url violates the 255 character limit
yea i think so, well that data is actually the cookie details for a site. Is there a way i can pass that so i can then later save it. I mean there has to be a way to save all that into a file .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Scribe. SEO Made Simple.

SE Nuke



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


SEO Paladin


Web Hosting
Copyright © 2005 - 2012 BlackHatWorld.com All rights reserved.