NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Website Development
Reload this Page PHP: URL data problem. Little help if possible.

Website Development Development concepts, scripts, sponsors and affiliate programs.

Advanced Search
1 members in live chat ~  


Reply
 
LinkBack Thread Tools
Old 06-27-2011, 03:58 AM THREAD STARTER               #1 (permalink)
New Member
Join Date: Apr 2011
Posts: 5
blowtar is an unknown quantity at this point
 



PHP: URL data problem. Little help if possible.


Hi guys.
????: NamePros.com http://www.namepros.com/website-development/720602-php-url-data-problem-little-help.html

I thought I would turn to here so that I could get some advice off you lot as you can be very experienced in this subject.

Ok so I have a big problem. I have created a link which looks like:

<a href="productPage.php?NAME=<?php echo $name; ?>&IMAGEURL=<?php echo $imageurl; ?>"> <?php echo $name; ?> </a>

Now this works fine and it pulls the information from my database. But when I have all the information being passed over to the 'productPage' the URL becomes to big and won't view properly in any of the browsers. This is because most URL have a large cap of around 3k words or even below that.

I need a way of which when I click on the link, it passed data to the 'productPage' but does not use tons of code in the URL. I'm not sure if this can be done with cookies or sessions but it seems likely.

Any help would be amazing, thank you.
blowtar is offline   Reply With Quote
Old 06-27-2011, 11:27 AM   #2 (permalink)
Domains my Dominion
 
sdsinc's Avatar
Join Date: Aug 2005
Location: Web 1.0
Posts: 9,963
sdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatness
 


Third World Education Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Animal Rescue Animal Cruelty AIDS/HIV Animal Rescue Wildlife Breast Cancer Animal Rescue Wildlife
There is a limit of 2048 characters for GET requests as per HTTP standard.
Normally it's enough the pass the product ID in the URL, then the target page should fetch the product info from the DB. You can also create SEO-friendly URLs like this.
__________________
NameNewsletter.com - free lists of available domain names
ZoneFiles.net (beta) - ccTLD and gTLD droplists
sdsinc is offline   Reply With Quote
Old 06-27-2011, 11:31 AM   #3 (permalink)
NamePros Member
Join Date: Apr 2009
Posts: 189
dottelads.com has a spectacular aura aboutdottelads.com has a spectacular aura about
 



as already suggested, easiest and best thing to do is only pass a key that can be used to query the database and get the rest of the info.

if however you absolutely must still pass all the data, switch to using post and use javascript to submit the form when the link is clicked.
dottelads.com is offline   Reply With Quote
Old 06-27-2011, 12:59 PM THREAD STARTER               #4 (permalink)
New Member
Join Date: Apr 2011
Posts: 5
blowtar is an unknown quantity at this point
 



Umm.


Umm using another language might be the key to be honest. Good call.

I'm working on a affiliate wesbite ya-see, and the buyurl and imageurl in the database are massive in length.

Thanks a lot guys.
blowtar is offline   Reply With Quote
Old 06-27-2011, 02:24 PM   #5 (permalink)
Domains my Dominion
 
sdsinc's Avatar
Join Date: Aug 2005
Location: Web 1.0
Posts: 9,963
sdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatness
 


Third World Education Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Animal Rescue Animal Cruelty AIDS/HIV Animal Rescue Wildlife Breast Cancer Animal Rescue Wildlife
You're bound to have problems with URLs that long.
Honestly I can't see the justification for it.
__________________
NameNewsletter.com - free lists of available domain names
ZoneFiles.net (beta) - ccTLD and gTLD droplists
sdsinc is offline   Reply With Quote
Old 06-27-2011, 02:51 PM   #6 (permalink)
Senior Member
 
defaultuser's Avatar
Join Date: May 2009
Location: internet@ctivist.com
Posts: 4,799
defaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatness
 



Originally Posted by sdsinc View Post
You're bound to have problems with URLs that long.
Honestly I can't see the justification for it.
I can't believe that the URL would be even close to 2K!
????: NamePros.com http://www.namepros.com/showthread.php?t=720602

------

As far as the solution goes - you store the name/url pair in a table - there's no reason you couldn't create and autogenerated key (ID ) anyway.

That said - if your query access is via a long string like that it won't be long before your indexes get huge and useless.

You could also do url rewrites, shortening services, meta refreshes etc to try and mask the affiliate url.

Here's a TIP

if you implement your own url-shortener/expander on your site then no one can remove your affiliate link.


J.
__________________
A Member of: IdeationTeam.com
HowToBeADomainer.com - a Domaining How To
AuthorEditor.com
Last edited by defaultuser; 06-27-2011 at 06:08 PM.
defaultuser is online now   Reply With Quote
Old 06-27-2011, 04:50 PM   #7 (permalink)
NamePros Regular
 
tiawood's Avatar
Join Date: Oct 2008
Location: Florida
Posts: 450
tiawood is a splendid one to beholdtiawood is a splendid one to beholdtiawood is a splendid one to beholdtiawood is a splendid one to beholdtiawood is a splendid one to beholdtiawood is a splendid one to beholdtiawood is a splendid one to beholdtiawood is a splendid one to behold
 




The site is already in php. It wouldn't be too much work to pass the id only and then pull the data from the database via the id.
tiawood is offline   Reply With Quote
Old 06-29-2011, 02:52 AM THREAD STARTER               #8 (permalink)
New Member
Join Date: Apr 2011
Posts: 5
blowtar is an unknown quantity at this point
 



Thanks for the responses guys, gives me some stuff to think about.

As I said above, the URLs can be massive due to the long links provided by the affiliate supplier. Alls I want is all the information to pass over to another page when I click on a link, I guess I'll use another language or look into optimizing my database so that I can drag information through from an ID of some sort.
blowtar is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
LiteSpeed ⇔ cPanel ⇔ PHP 5.2/5.3 ⇔ Softaculous ⇔ RVSiteBuilder ⇔ R1Soft ⇔ Get 50% OFF CrocWeb Web Hosting Offers 0 06-13-2011 03:21 PM
Domainate Weekly 6/9: SeniorsGroups(.)com, MigraineRemedies(.)org + 28, < $130 each Domainate.com Domains For Sale - Fixed Price 1 06-13-2011 11:40 AM
LiteSpeed ⇔ cPanel ⇔ PHP 5.2/5.3 ⇔ Softaculous ⇔ RVSiteBuilder ⇔ R1Soft ⇔ Get 50% OFF CrocWeb Web Hosting Offers 0 05-30-2011 11:29 AM
LiteSpeed ⇔ cPanel ⇔ PHP 5.2/5.3 ⇔ Softaculous ⇔ RVSiteBuilder ⇔ R1Soft ⇔ Get 50% OFF CrocWeb Web Hosting Offers 0 05-15-2011 10:53 PM

 
All times are GMT -7. The time now is 10:39 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger