aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Amuleweb-PHP split  (Read 2636 times)

Frunktz

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Amuleweb-PHP split
« on: November 20, 2009, 03:04:05 PM »

Hi!
I try to put a very simple function that is sure implemented in amuleweb-PHP (split) and the webserver loop infinitly

$link = "test123|qwerew|vmcblcvm|string122"
$tmp = split("|", $link, 2);   <= I've tried to change 2 with 1 or 999 but the problem is the same..
echo $tmp[1]."<br>";

Why?? How is the correct use of that function?
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: Amuleweb-PHP split
« Reply #1 on: November 20, 2009, 05:48:19 PM »

- The function is indeed implemented in amuleweb
- You need to escape the | symbol

These links may or may not be helpful :)
http://wiki.amule.org/index.php/AMuleWeb_PHP
http://www.php.net/manual/en/function.split.php
« Last Edit: November 20, 2009, 05:51:28 PM by woutermense »
Logged

lfroen

  • Guest
Re: Amuleweb-PHP split
« Reply #2 on: November 21, 2009, 02:57:10 PM »

Quote
... and the webserver loop infinitly
Looks buggy in any case. I'll check this case.
Logged

lfroen

  • Guest
Re: Amuleweb-PHP split
« Reply #3 on: November 21, 2009, 03:14:11 PM »

Anyway, you should be writing [|] as split pattern
Logged