APN: wap.vodafone.co.uk
Username: wap
Password: wap
MMSC: http://mms.vodafone.co.uk/servlets/mms/
MMS Proxy: 212.183.137.012 (note the leading zero in the last octet)
MMS Max Message Size: (blank)
MMS UA Prof URL: (blank)
Archive for the 'tidbit' Category
Vodaphone UK MMS Contract Settings
Parse MusicBrainz XML with jQuery
For a project I’m working on to help people make posts over at http://www.warez-dnb.com/ i’ve been looking into parsing MusicBrainz, I thought id make a quick post to discuss the challenges and solutions I’ve come up with so far.
<html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $.ajax({ type: "GET", url: "http://www.warez-dnb.com/test/getid.php?name=Caspa", dataType: "xml", success: function(xml) { $(xml).find('artist-list').each(function() { alert($(this).find("name").text()); }); } }); }); </script> </head> <body> </body> </html>
This is the index.html file and jQuery code, its pretty simple, I was just testing that I could get a valid connection, then parsing the XML within artist-list and outputting anything that has the XML tag name
One question that might arise from looking at this code is why the url is hosted at warez-dnb, jQuery wont let you import XML from a remote web host, it has to be from the local server, i’ve written an extremely simple PHP function that will query musicbrainz and copy the result it gets to host it locally.
<?php
// Set your return content type
header('Content-type: application/xml');
// Website url to open
$daurl = 'http://musicbrainz.org/ws/1/artist/?type=xml&name=' . $_GET["name"];
// Get that website's content
$handle = fopen($daurl, "r");
// If there is something, read and return
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose($handle);
}
?>
Terminal Command Mac Create RAR Archives
If you want to pack your files into RAR’s then use this simple Terminal command
rar a -v100000 MySplitRarArchive
where -vxx is the file size of each of the RAR files in kb’s
Change CNAME in WHM
I wanted my domain to work with MobileMe, here’s how to do it if you have WHM.
1. Login to WHM.
2. Click on “Edit DNS zone”.
3. Choose the domain name for which you wish to edit CNAME record.
5. Choose record type that is prefixed with “www” with CNAME in the drop down box.
6. Enter Value/Destination in last text box.
7. Click Save button to submit the changes.
SMF 2.0 Custom Button in "Start new topic"
With the help of SMF forum member Arantor I was able to add a custom button to my Simple Machines Forum 2.0 (Warez-DnB)
To add a custom button you need to make an edit in the Sources/Subs-Editor.php file.
Locate
// The below array makes it dead easy to add images to this control. Add it to the array and everything else is done for you!
$context['bbc_tags'] = array();
$context['bbc_tags'][] = array(
You can now see how a button is made up within SMF 2.0 for this example we will use the [img] button. ![]()
'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt['image']),
You can see how this is made up, to add your own function (in the case of Warez-DnB a button that will atomically copy in the text [img]http://images.my-domain.com/nocd.png[/img]
I added
'noimg' => array('code' => 'noimg', 'before' => '[img]http://images.warez-dnb.com/nocd.png', 'after' => '[/img]', 'description' => $txt['No picture']),
You’ll also want to add the button within your theme’s images/bbc folder that needs to be the same file name as the function, in this case “noimg.gif” ![]()
Simple stuff but handy to know.
