victorianrider Posted April 30, 2010 Share Posted April 30, 2010 Ok, please excuse my un-professionalism, but I am literally days old to PHP and I am VERY keen to pursue. I have a question on how to split data from the result of this: <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://mobsters-fb-apache-dynamic-lb.playdom.com/mob_fb/get_min_hit_list_bounty?user_id=100000910972198&target_id=100000952273457&level=358&session_id=b66a3557824d69f1833f1755dadedf4cda3b9480&session_key=23396e29551e059fe0b3b7d4c2896d8a054d3ab4&auth_key=88458a51fdbbc2dd967c2092b05dbe243c0b2122&nocache=1272667676805&"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "postvar1=value1&postvar2=value2&postvar3=value3"); curl_exec ($ch); curl_close ($ch); ?> And the text that is displayed on the end result is similar to something like this (it changes because it is part of a game on Facebook) 20900010450007070174 How do I split that data to what I want it to be which is : Min Cost=209000 Max Cost=1045000 Request ID=7070174 ? Sorry if it is a big ask, for all I know this could be impossible, or incredibly simple. Thanks Link to comment https://forums.phpfreaks.com/topic/200274-need-help-on-splitting-some-data-from-curl-function-i-am-very-new-to-php/ Share on other sites More sharing options...
trq Posted April 30, 2010 Share Posted April 30, 2010 Are these numbers always of a specific length? You need to explain to us the pattern which these values can be split against. Link to comment https://forums.phpfreaks.com/topic/200274-need-help-on-splitting-some-data-from-curl-function-i-am-very-new-to-php/#findComment-1050999 Share on other sites More sharing options...
victorianrider Posted April 30, 2010 Author Share Posted April 30, 2010 Are these numbers always of a specific length? You need to explain to us the pattern which these values can be split against. Well if you click on the header I have posted it will show you the pattern. But it can change either up or down. Is it possible to code the script to check the header and post each value on different lines or with spaces between each other? Link to comment https://forums.phpfreaks.com/topic/200274-need-help-on-splitting-some-data-from-curl-function-i-am-very-new-to-php/#findComment-1051000 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.