Bocard's Profile
Reputation: 15
Tradesman
- Group:
- Active Members
- Active Posts:
- 217 (0.13 per day)
- Joined:
- 24-September 08
- Profile Views:
- 3,042
- Last Active:
Apr 15 2013 06:09 AM- Currently:
- Offline
Previous Fields
- Country:
- RO
- OS Preference:
- Windows
- Favorite Browser:
- Chrome
- Favorite Processor:
- AMD
- Favorite Gaming Platform:
- PC
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Latest Visitors
-
StefanOnRails 
24 Nov 2012 - 05:43 -
darek9576 
08 Nov 2012 - 17:00 -
ankurtyagi 
20 Jun 2012 - 20:33 -
nicolae1ceaus... 
20 May 2012 - 13:19 -
oha055 
12 May 2012 - 16:11
Posts I've Made
-
In Topic: Backseat Coder - Watch a professional programmer tackle some code.
Posted 8 Nov 2012
Did this happen? Is there a video on youtube now? -
In Topic: I'm having trouble extracting a single value from my database
Posted 7 Nov 2012
I am not sure I understand what your problem is. Are you trying to get only the data from the "youtube" column? If you said that it works when you useWHILE($rows = mysql_fetch_array($query)): $artist = $rows['artist']; $title = $rows['title']; $lyrics = $rows['lyrics']; echo $artist." - ".$title; endwhile;
You should try $rows['youtube'];
If this is not the problem please make me understand what is and I will try to help you further.
It is better practice to switch to using mysqli or PDO instead of mysql. -
In Topic: Php post request with curl and json data
Posted 5 Nov 2012
Thank you very much! It now works and I will read about that interface. -
In Topic: Php post request with curl and json data
Posted 5 Nov 2012
Kruithne, on 05 November 2012 - 12:40 PM, said:Could you var_dump the $request->getJsonData() and post the output, please?
array (size=2) 'action' => string 'search' (length=6) 'params' => array (size=1) 'query' => string 'big' (length=3)
The getJsonMethod is below. I have it to be able to make a json_encode on the object later on.
public function getJsonData() { return get_object_vars($this); } -
In Topic: Php post request with curl and json data
Posted 5 Nov 2012
thanks for the answer guys. Intracker.php
I have this:
if(isset($_POST['request'])) { try{ // sendMail("was set----->"); $request_dispatcher = new RequestDispatcher($_POST['request']); echo json_encode($request_dispatcher->getResponse()->getJsonData()); } catch(Exception $e) { //todo return response with fail message } }
And in the request dispatcher I am doing this in the constructor:
public function __construct($raw_request) { $this->controller = new RequestsController(); $decoded = json_decode($raw_request); try { $this->request = new Request($decoded->action, $decoded->params); $this->response = $this->dispatchRequest(); } catch(Exception $e) { //todo improve logic $response = new Response(0, "error",false, array()); $response->addError($e->getMessage()); $this->response = $response; } }
But my problem is when I set the Post request params. Because I don't get further down the road.
I'm trying to post one param named "request" and that fails for me..
My Information
- Member Title:
- D.I.C Head
- Age:
- 22 years old
- Birthday:
- April 1, 1991
- Gender:
-
- Location:
- Denmark
- Full Name:
- Victor Mihalcea
- Programming Languages:
- Pascal,C#, Java
Contact Information
- E-mail:
- Click here to e-mail me
- Website URL:
-
http://
- Yahoo:
-
bocard_ice
- Skype:
-
bocard.ice
- Facebook:
- http://facebook.com/bocard.ice
- Twitter:
- Bocard23
Friends
Bocard hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
Bocard has no profile comments yet. Why not say hello?