Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Vimeo - Problem.
damianpsp2000
post
Post #1





Grupa: Zarejestrowani
Postów: 51
Pomógł: 1
Dołączył: 10.07.2012

Ostrzeżenie: (0%)
-----


Witam.
Mam link Vimeo np.

http://vimeo.com/4985230

I chcę uzyskać samo ID, czyli 4985230

próbowałem tak:

$url = 'http://vimeo.com/4985230';
$vimeo_id = parse_url($url, PHP_URL_PATH);

ale nic z tego, nie wiem jak to zrobić.
Szukałem w Google ale nie znalazłem nic działającego.

Chcę tylko samo to id do bazy zapisać.

Pozdro i proszę o szybką pomoc.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
damianpsp2000
post
Post #2





Grupa: Zarejestrowani
Postów: 51
Pomógł: 1
Dołączył: 10.07.2012

Ostrzeżenie: (0%)
-----


no tak, właśnie:)

dziękuję(IMG:style_emoticons/default/smile.gif)


ale mam jeszcze jeden problem, robię mapkę google i tak:
mam taki kod:

  1. <?php
  2. $adres = 'http://maps.google.com/maps/geo?output=json&oe=utf-8';
  3. $adres.='&q='.urlencode('Warszawa,Polska');
  4. $strona = file_get_contents($adres);
  5. $dane = json_decode($strona, true);
  6. print_r($dane);
  7. ?>


zwraca to:

Array ( [name] => Warszawa,Polska [Status] => Array ( [code] => 200 [request] => geocode ) [Placemark] => Array ( [0] => Array ( [id] => p1 [address] => Warsaw, Poland [AddressDetails] => Array ( [Accuracy] => 4 [Country] => Array ( [AdministrativeArea] => Array ( [AdministrativeAreaName] => Mazowieckie [SubAdministrativeArea] => Array ( [Locality] => Array ( [LocalityName] => Warszawa [PostalCode] => Array ( [PostalCodeNumber] => 05 ) ) [SubAdministrativeAreaName] => Warszawa ) ) [CountryName] => Polska [CountryNameCode] => PL ) ) [ExtendedData] => Array ( [LatLonBox] => Array ( [north] => 52.3679991 [south] => 52.0978768 [east] => 21.2710986 [west] => 20.85129 ) ) [Point] => Array ( [coordinates] => Array ( [0] => 21.0122287 [1] => 52.2296756 [2] => 0 ) ) ) ) )


i chcę same współrzędne zapisać do bazy czyli to:
[coordinates] => Array ( [0] => 21.0122287 [1] => 52.2296756


proszę o pomoc.

pozdro.

Ten post edytował damianpsp2000 18.08.2012, 13:14:42
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.10.2025 - 21:41