Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Need Help With Urls
Duckie
post Dec 29 2004, 04:38 AM
Post #1


Newbie [Level 1]
*

Group: Members
Posts: 12
Joined: 25-December 04
Member No.: 2,918



OK uh how do i make a script to where it would auto replace spaces in aim names with + but it appears with a space on the site, with the aimgo: url cmd.. so like

asdf asdf sdf

would be in the code:
CODE
<a href="aim:goim?screenname=asdf++asdf+sdf&amp;message=boo"></a>



and i have an auto thing, where i add a member, but how would it replace cause like i have a Edit Profile section with lazy ppl forgetting to put the + in between spaces

thanks~
if u have ne q's ask me at aim ARandomDot

thanks in advance
Go to the top of the page
 
+Quote Post
rigueira
post Nov 27 2007, 12:22 PM
Post #2


Newbie [Level 2]
**

Group: Members
Posts: 28
Joined: 25-November 07
Member No.: 53,723



in PHP language you can use 'explode' function to remove spaces from a String or 'implode' function to put spaces into then...

http://br2.php.net/manual/en/function.explode.php

http://br2.php.net/manual/en/function.implode.php
Go to the top of the page
 
+Quote Post
galexcd
post Nov 27 2007, 07:03 PM
Post #3


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
***********

Group: [HOSTED]
Posts: 1,189
Joined: 25-September 05
From: Los Angeles, California
Member No.: 12,251
myCENT:39.85



explode takes a string and breaks it up into an array while implode "glues" an array back together, so if you used explode and implode you would have to do something like this:
CODE
implode("+",explode(" ",$string));

which is a huge waste of code and processor time.

I would suggest using str_replace if you want to use php for this.
CODE
str_replace(" ","+",$string);


If you don't want to use php javascript has a very similar function:
CODE
string.replace(" ","+");


If you gave me some code on your website I could help implement it for you.

This post has been edited by alex7h3pr0gr4m3r: Nov 27 2007, 07:03 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Can Anyone List Some Good Urls For Photoshop Brushes?(5)
  2. Clean Url's(5)
  3. Directing All Urls In A Direcrory To One(3)
  4. Renaming Your Url's(3)
  5. Accessing Password-protected Urls(4)
  6. File Urls?(5)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 05:15 PM