Welcome Guest, Not a member yet? Register   Sign In
Sending variables via URI string
#11

[eluser]evolutionxbox[/eluser]
I have done the above (changed AllowEncodedSlashes to On), now my play controller is echoing 'http:' and that is it...

I don't understand this bit:
Quote:Once you've done this you might need to fiddle around with
Code:
$config['permitted_uri_chars']
in codeigniter if it is still not working - you may find the slashes get filtered out
#12

[eluser]Tominator[/eluser]
[quote author="Matthieu Fauveau" date="1271482346"]Try editing the config/routes.php and add something like :

Code:
$route['test/play/:any'] = 'test/play';

That should help Wink[/quote]

I think you should try:

Code:
$route['test/play/:any'] = 'test/play/$1';
#13

[eluser]evolutionxbox[/eluser]
Sorry, it is still the same. =(
#14

[eluser]evolutionxbox[/eluser]
As this doesn't seem to be working, is there any other viable way to send the url from one controller to another?

I was thinking something like using sessions... but that seems a bit overkill.
#15

[eluser]_kailash[/eluser]
Maybe you can pass the hex value of the url with bin2hex() and then in your controller you can decode it using pack()

this is for generating the url
Code:
<?php
$url = site_url('test/play/'.bin2hex('http://your-url'));

and then
Code:
<?php

class Test extends Controller {

    function Test()
    {
        parent::Controller();
    }
    
    function index()
    {

    function play($url)
    {
        echo pack('H*',$url);
    }
}
#16

[eluser]evolutionxbox[/eluser]
That worked... it comes out as a very long string but thanks a ton! =)




Theme © iAndrew 2016 - Forum software by © MyBB