[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

PHP GET string

Posted on 2010-03-25
3
Medium Priority
?
277 Views
Last Modified: 2013-12-13
<?php  error_reporting(0); $Cid = $_GET["imgID"]; ?>
 
  <php include ("CallImage?imgID=$????") ?>


This would be the data I have.

CallImage?imgID=1666690577102281968

How could I parse the numbers and extract   the 6 - 11 digit?
To get this?  

CallImage?imgID=905771

And help is greatly appreciated.


905771 = $????
0
Comment
Question by:selvol
  • 2
3 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 28641182

$rest = substr($Cid, 6, -8);  // returns "cde"
0
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 2000 total points
ID: 28641371
try this,

<?php
 

$Cid="1666690577102281968";
$rest = substr($Cid, 5, -8);  // returns "cde"

echo $rest;


?>
0
 
LVL 17

Author Comment

by:selvol
ID: 28643327
Perfect.
I feel better  Now that I have been educated.
I appreciate the assistance.............
Selvol
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

613 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question