Pulling Data from URL (action.php/wacars/pirep?id= etc)

Hello all,

For WorldACARS I have chosen to have the program open a browser and go to http://localhost/action.php/wacars/pirep and then insert the data after the url (e.g wacars/pirep?id=1&code=VMS). I always get:

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wacars::pirep' was given in /home/a5059087/public_html/core/classes/MainController.class.php on line 218

With this code:

private function pirep()
	{


			$id = $_GET['id'];      		

			$code = $_GET['code'];      		

			$flightnum = $_GET['flightnum'];      		

			$depicao = $_GET['depicao'];      		

			$arricao = $_GET['arricao'];  

			$aircraft = $_GET['aircraft'];  

			$flighttime = $_GET['flighttime'];  

			$landingrate = $_GET['landingrate'];  

			$comment = $_GET['comment'];  

			$fuelused = $_GET['fuelused'];      	  

			$load = $_GET['load'];   	


			$data = array(
			'pilotid'=>$id,
			'code'=>$code,
			'flightnum'=>$flightnum,
			'depicao'=>$depicao,
			'arricao'=>$arricao,
			'aircraft'=> $aircraft,
			'registration'=>$registration,
			'flighttime'=> $flighttime,
			'landingrate'=> $landingrate,
			'submitdate'=>'NOW()',
			'comment'=> $comment,
			'fuelused'=> $fuelused,
			'source'=>'worldacars',
			'load'=>$load,
			'log'=>$log,
			'flighttype'=>$type,
			);

			$ret = ACARSData::FilePIREP($pilotid, $data);


	}

Something about the code doesn’t seem right to me with that code pulling the data from the URL…

Can anyone help me?

Thanks,

Mitchell

I would recommend using POST and sending it as XML (or parameters, but XML might be easier), which you can parse easily.

The problem with GET is that there is a character limit.

Also, you did private function when it should be public. As private, the dispatcher can’t call it.