URL Parser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
PnHoPob
Forum Newbie
Posts: 16
Joined: Thu Nov 10, 2005 7:16 pm

URL Parser

Post by PnHoPob »

I'm away from a php-coding computer right now, but as soon as I get home, I'm gonna try to do this.
I'm trying to do something similar to pastebin, however I do not want to upload every file to my server and waste space. Instead, since this will be used mostly on forums, I thought I'd make a potentially really, really long URL.

This is what I'm thinking:
viewforum.php?f=1&t=%22uploadedstuffhere%22

To check it out, I tried to visit [url=viewforum.php?f=1&t=%22Lorem%20ipsum%20 ... tellus.%22]this[/url] site (with 5 paragraphs of Lipsum saved to t) and it loads.

So these are my questions:
- Is there a size limit to URLs?
- Can URLs contains slash characters like \r and \n?
- How can URLs contain % signs (like %22) and not see that as a " ?
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

In a word, no.

It cannot be done for a few reasons, two of which are:

1. URL is limited to 255 characters.

2. URL encoding mismatches.
Post Reply