I am currently working on an API system for a short url service, at this moment iam working on the QRcode section. Now heres my question:
If you look at bit.ly the have the following url for there qrcode.
How do i filter .qrcode out of a url, i have searched many sites but could not find a solution.
Hope someone can help me with this.
Im not sure I understand you very well.If you want to drop the qrcode
$original = "http://bit.ly/4nXvaN.qrcode"; echo '<a href="'.$original.'">'.$original.'</a><br />'; $new = str_replace(".qrcode","",$original); echo '<a href="'.$new.'">'.$new.'</a><br />';
If you are wanting to get just the qrcode, it is not hidden in the url they give you. It is more likely in the database along side the original url. The ”.qrcode” attachment is most likely a trigger object.
I can imagine that they probably have a small script that reads the url, if .qrcode is present, then they return the qrcode instead of redirecting you to the original website.
Google offers a free qrcode service
$your_link = "http://www.fremonttech.com"; echo '<a href="http://chart.apis.google.com/chart?chs=200x200&cht=qr&chl='.urlencode($your_link).'&choe=UTF-8">QR Code</a><br />'; echo '<img src="http://chart.apis.google.com/chart?chs=200x200&cht=qr&chl='.urlencode($your_link).'&choe=UTF-8" /><br />';BTW , you can alter the size of the qrcode from bit.ly as well