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
How to pass slash / in an URL?
Old 05-18-2011, 06:33 AM How to pass slash / in an URL?
ScrapingWeb.com's Avatar
Average Talker

Posts: 25
Location: ScrapingWeb.com
Trades: 0
On this page there are many abbreviation / acronym entries: http://abbreviations.wordcrow.com/acronyms/D/

They are generated in PHP:

PHP Code:
<a href="/define/<?php echo rawurlencode($abbreviation['title'])?>/">
    <strong><?php echo $abbreviation['title']?></strong>
</a>
I used rawurlencode because many acronyms contain bizarre characters such as #, & and even /.

And the URL requests such as:

http://abbreviations.wordcrow.com/define/DA%26E/

Would first be fed to rawurldecode():

PHP Code:
$acronym rawurldecode('DA%26E'); // $acronym would be 'DA&E'. 
And then used in database queries.

While DA&E is all right, DA/C is not. Try this URL http://abbreviations.wordcrow.com/define/DA%2FC/ and you would end up with http://abbreviations.wordcrow.com/define/DA/C/ which is an error page.

I can extend more code to recognize /define/DA/C/ but it's just weird and non-sensible. I tried both Chrome and Firefox and they all automatically convert DA%2FC to DA/C. But with DA%26E, they don't.

What am I doing wrong? Ain't that / already encoded into '%2F'?? Really weird. Any help would be appreciated!
__________________

Please login or register to view this content. Registration is FREE
for webmasters who need the data to get started on niche information sites. Here are
Please login or register to view this content. Registration is FREE
.
ScrapingWeb.com is offline
Reply With Quote
View Public Profile Visit ScrapingWeb.com's homepage!
 
 
Register now for full access!
Old 05-18-2011, 09:25 PM Re: How to pass slash / in an URL?
Super Spam Talker

Posts: 880
Name: Paul W
Trades: 0
A Chinese content scraper looking for help

Best of luck. And I mean that really sincerely.
__________________

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


*** New:
Please login or register to view this content. Registration is FREE
PaulW is online now
Reply With Quote
View Public Profile
 
Old 05-20-2011, 08:12 AM Re: How to pass slash / in an URL?
Banned

Posts: 122
Name: devashish kumar
Trades: 0
I don't have any idea otherwise i definitely help you.
devashishseo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to pass slash / in an URL?
 

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.11500 seconds with 12 queries