Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-21-2006, 10:20 AM Get variables...
Junior Talker

Posts: 1
Trades: 0
Hi everyone I'm new here, I'd like to ask if my php page got something like this in the url
Code:
http://www.something.com/something.php?var1=http%3A%2F%2Fmangataz.free.fr%2Fmanga%2Fnaruto.htm&var2=naruto&var3=http%3A%2F%2Fsomething.com%2Fsomething.php%3Fq%3Dnaruto%26var4%3Dhttp%253A%252F%252Fmangataz.free.fr%252Fmanga%252Fnaruto.htm%26imagesrc%3D
Now php understood variable 1 and 2 but couldn't understand variable 3. In variable 1 %3A is ":" and %2F is "/" but once we reach variable 3, we start having %3F which is "?" and %3D which is "=". And then %26 is "&" and %253A becomes ":" and %252F becomes "/" (basicly, since we have another "?", 25 is being added to these things, like %2F becomes %252F....)
Now is there anyway to let php understand the variables that come after var3? I usually use $HTTP_GET_VARS ir request to get variables.......
If there is no way, I thought I could take the entire unknown text as var3 and then replace each occurence of %26, %253A etc by the correct character and then I will be left with a variable, say
Code:
$var3 = "<A href="http://www.something.com/something.php?q=naruto&var4=......"[/code">http://www.something.com/something.php?q=naruto&var4=......"
now how can I extract var4 or "q" out of var3. I hope I didnt confuse the hell out of you....I'm sorry if I did....
anbu_nin is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-21-2006, 10:59 AM Re: Get variables...
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
Are you asking to decode the URL? Simply use urldecode().
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Get variables...
 

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.40169 seconds with 12 queries