Jump to content

Need help on splitting some data from CURL function (I am VERY new to php)


victorianrider

Recommended Posts

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

 

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.